0

I am trying to create a response that will return 3 files with one request. However, if you give it to the response body, I am in trouble because I do not know whether it can be realized.

The method of generating the response body that I am about to deliver is trying to return using python's MultipartEncoder

[ response body ] ※Boundary generation is also done

--dd7457a7dc684f32b2fd26ec468ed4b8
Content-Disposition: form-data; name=file1; filename="test1"
Content-Type: application/octet-stream

test1 sample

--dd7457a7dc684f32b2fd26ec468ed4b8
Content-Disposition: form-data; name=file2; filename="test2"
Content-Type: application/octet-stream

test2 sample

--dd7457a7dc684f32b2fd26ec468ed4b8
Content-Disposition: form-data; name=file3; filename="test3"
Content-Type: application/octet-stream

test3 sample

--dd7457a7dc684f32b2fd26ec468ed4b8--

Body as above

The following header

response.headers["Content-Type"] = 'multipart/form-data`

I know that swagger-ui.js creates a download link with the fileapi's blob library, but download three files via the download link of three files or one download link using the blob library it can

Is there such a way?

It is already possible to do a method of consolidating files into tar or zip and then doing DL and json format.

I would like to ask if there is any way.

[version]

swagger-ui 2.2.10

Python 3.4.4

flask 0.10.1

Community
  • 1
  • 1
  • Possible duplicate of [How to download multiple files with one HTTP request?](http://stackoverflow.com/questions/1041542/how-to-download-multiple-files-with-one-http-request) – Klaus D. Jan 23 '17 at 09:14
  • Although it is said to be a duplication, for example, we generate 3 URLs and think that we can make 3 download links with Swagger Ui. – toshi_yama Jan 23 '17 at 09:33

0 Answers0