{"task": {"agent_timeout": 3600, "task": "task_attacomsian_code_examples__file_upload_apis", "verifier_timeout": 1800, "instruction": "You are a backend development expert. Please inspect the backend project located in the current directory, determine its programming language and architectural style, and then complete the following code implementation and environment setup tasks.\n\nImplement the Express request handlers for the Multer-backed upload routes defined in nodejs/express-multer/index.js.\n\nRequirements\n1. /upload-avatar (POST)\n   - Multer already stores the single file in req.file using the field name avatar. Validate that a file exists; if not, send HTTP 400 with { status: false, data: 'No file is selected.' }.\n   - When a file exists, respond with HTTP 200 and { status: true, message: 'File is uploaded.', data: { name, mimetype, size } } where the file metadata values are taken from req.file.\n   - Preserve the existing middleware stack (multer, async handler) and ensure operational errors fall through to the catch path by returning standard Promise rejections/throws.\n\n2. /upload-photos (POST)\n   - Multer already stores the uploaded array in req.files via upload.array('photos', 8). Validate that photos contains at least one entry; otherwise, respond with HTTP 400 and { status: false, data: 'No photo is selected.' }.\n   - For successful submissions, build an array of objects representing each file ({ name, mimetype, size }) and return HTTP 200 with { status: true, message: 'Photos are uploaded.', data: <array> }.\n   - Stay within the configured upload constraints: do not read beyond req.files, and make sure the handler resolves cleanly so Express can continue logging via morgan.\n\n3. Error handling\n   - Wrap both handlers in try/catch (or promise rejections) so that unexpected failures send HTTP 500 with the thrown error.\n\nThe TODO blocks inside nodejs/express-multer/index.js should be replaced with this exact behavior. EOF\nPlease locate the appropriate place in the project and apply the necessary modifications.\n\nAfter completing all source code implementation, create a Dockerfile for this project using the following example template as a reference (Python version):\n```\n# setup base\nFROM nikolaik/python-nodejs:python3.12-nodejs22-bullseye\nRUN apt-get update && apt-get install -y sqlite3\n\n# install dependencies and copy project files\nWORKDIR /app\nCOPY . /app/\nRUN python3 -m pip install -r requirements.txt\n\nENTRYPOINT [\"python3\", \"app.py\"]\n```\nNotes:\n1. Ensure that all required project dependencies are properly installed inside the image.\n2. The generated Dockerfile must successfully build and run the application.\n3. The Dockerfile must be created in the root directory of the backend project, i.e `/app/attacomsian_code-examples/Dockerfile`\n", "memory": "", "runnable": false, "difficulty": "hard", "language": "", "cpus": "", "instruction_truncated": false, "category": "Specialized", "compose": true, "has_solution": true, "oracle": null, "docker_image": "", "taskset": "abc-bench", "tags": []}, "runs": []}