I have an endpoint defined to accept a multipart/form-data
file like so:
@Post('/...')
@SuccessResponse(202, 'Accepted')
@Response(400, 'Bad request')
@Response(404, 'Not found')
public async acceptFile(
@UploadedFile('file') file: Express.Multer.File
): Promise<...> {
return this.fileService.acceptFile(file);
}
When I send a multipart/form-data
request with a file parameter, TSOA does not accept this request, claiming that "'file' is required". Even though I provided it:
As you can see the request is created by Postman, is correct and has the file
form data parameter. According to TSOA file upload documentation this should work.