how can I upload image or json file ?
- Dominant language
- JavaScript
- Stars
- 12.1k
- Forks
- 1.1k
- Avg merge
- 8d 2h
- Merged PRs (30d)
- 21
Description
when I tried to upload json file, I found this error:
`MulterError: Unexpected field
at wrappedFileFilter (E:\nodejs-projects\uploadFiles\node_modules\multer\index.js:40:19)
at Multipart. (E:\nodejs-projects\uploadFiles\node_modules\multer\lib\make-middleware.js:107:7)
at Multipart.emit (node:events:513:28)
at HeaderParser.cb (E:\nodejs-projects\uploadFiles\node_modules\busboy\lib\types\multipart.js:358:14)
at HeaderParser.push (E:\nodejs-projects\uploadFiles\node_modules\busboy\lib\types\multipart.js:162:20)`
how can I upload json file and add extension of file ? what abou Xlsx files ?
Contributor guide
Research direction
Start with Multer's upload configuration and the multipart field name used by the request, then review how the reported Unexpected field error relates to that configuration. Clarify the documented process and supported behavior for JSON, image, and XLSX uploads, including how file extensions are handled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- api, backend
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100