Skip to content

Curl call for file upload not working #30

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
chaki13 opened this issue Aug 9, 2019 · 1 comment
Closed

Curl call for file upload not working #30

chaki13 opened this issue Aug 9, 2019 · 1 comment

Comments

@chaki13
Copy link

chaki13 commented Aug 9, 2019

For my POST service when I use the option "Try it out", upload image and choose Execute my curl call look like

curl -X POST "http://localhost:8080/my-service/api/documents" -H "accept: */*" -H "Content-Type: multipart/form-data" -F "files=[object File]"

And I get response that no files are sent. And the curl call looks like it's missing file location or I'm wrong?

@chaki13 chaki13 changed the title Curl call for Upload file not working Curl call for file upload not working Aug 9, 2019
@springdoc
Copy link
Collaborator

Hi,

There is an open feature related to uploading files from the swagger-ui. Once fixed, we will add reference to the last version of the ui.
Uploading an arbitrary number of files (an array of files) is not supported.
There is an open feature request at:

For now, you can use a binary string array as a workaround for uploading an arbitrary number of files:

Note that this will not produce the file upload interface in Swagger UI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant