You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think this would be nice, but it's impossible to do so. The @pathToFile is strictly forbidden from javascript so there is no way to get the path from the browser (browsers will send fakepath as the path location).
It would, however, be better if we showed the file name instead, which is possible.
fehguy
added a commit
to swagger-api/swagger-js
that referenced
this issue
Jun 16, 2016
Swagger-ui (v 2.1.4) gets wrong curl for file uploading.
I upload a file on http://petstore.swagger.io/#!/pet/uploadFile.
Swagger gets the curl:
curl -X POST --header 'Content-Type: multipart/form-data' --header 'Accept: application/json' 'http://petstore.swagger.io/v2/pet/1/uploadImage'
Although the curl should be like:
curl -F "file=@/pathToFile" 'http://petstore.swagger.io/v2/pet/1/uploadImage'
see the http://stackoverflow.com/questions/12667797/using-curl-to-upload-post-data-with-files and https://curl.haxx.se/docs/manpage.html
The text was updated successfully, but these errors were encountered: