In Swagger openapi v3.0.0, facing issue in multiple file uploads

空扰寡人 提交于 2020-06-17 15:30:48

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!