0
votes

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

1 Answers

1
votes

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.