MulterError: Unexpected field
at wrappedFileFilter (C:\Users\roy.kakkenberg\WebstormProjects\arvisan-backend\node_modules\multer\index.js:40:19)
at Multipart.<anonymous> (C:\Users\roy.kakkenberg\WebstormProjects\arvisan-backend\node_modules\multer\lib\make-middleware.js:107:7)
at Multipart.emit (node:events:514:28)
at Multipart.emit (node:domain:488:12)
at HeaderParser.cb (C:\Users\roy.kakkenberg\WebstormProjects\arvisan-backend\node_modules\busboy\lib\types\multipart.js:358:14)
at HeaderParser.push (C:\Users\roy.kakkenberg\WebstormProjects\arvisan-backend\node_modules\busboy\lib\types\multipart.js:162:20)
at SBMH.ssCb [as _cb] (C:\Users\roy.kakkenberg\WebstormProjects\arvisan-backend\node_modules\busboy\lib\types\multipart.js:394:37)
at feed (C:\Users\roy.kakkenberg\WebstormProjects\arvisan-backend\node_modules\streamsearch\lib\sbmh.js:248:10)
at SBMH.push (C:\Users\roy.kakkenberg\WebstormProjects\arvisan-backend\node_modules\streamsearch\lib\sbmh.js:104:16)
at Multipart._write (C:\Users\roy.kakkenberg\WebstormProjects\arvisan-backend\node_modules\busboy\lib\types\multipart.js:567:19) {
code: 'LIMIT_UNEXPECTED_FILE',
field: 'files',
storageErrors: []
}
Possible Solution
Steps to Reproduce
Copy the example from the TSOA docs to upload files into a controller class.
Try to upload two files (one for each name).
Multer throws an error.
Context (Environment)
Version of the library:
Version of NodeJS:
Confirm you were using yarn not npm: [ ]
Detailed Description
For my project, I wish to create and endpoint that takes multiple files as input. These files need to be organized, so I wish to use a combination of @UploadedFile and @UploadedFiles parameters for my endpoint.
Sorting
I'm submitting a ...
I confirm that I
Expected Behavior
The docs about file uploads suggest that it is possible to use is possibly in the example.
Current Behavior
A multer error is thrown.
Possible Solution
Steps to Reproduce
Context (Environment)
Version of the library: Version of NodeJS:
Detailed Description
For my project, I wish to create and endpoint that takes multiple files as input. These files need to be organized, so I wish to use a combination of
@UploadedFile
and@UploadedFiles
parameters for my endpoint.Breaking change?