问题
Trying to upload multiple files in swagger api. While uploading single file with
files:
type: string
format: binary
Getting file in req.files, but when trying for multiple files with
files:
type: array
items:
type: string
format: binary
req.files = null and there is files: '[object file],[object file]' in req.body
using nodejs with express
回答1:
Uploading an array of files is supported in Swagger UI 3.26.0+ and Swagger Editor 3.10.0+. You need to upgrade your Swagger UI to the latest version.
Earlier versions had an issue where the string [object file],[object file]
was sent instead of the actual files.
来源:https://stackoverflow.com/questions/59192698/in-swagger-openapi-v3-0-0-facing-issue-in-multiple-file-uploads