Skip to content

Conversation

@aurelian
Copy link
Contributor

@aurelian aurelian commented Jul 2, 2014

As in subject: use SwaggerHttp from swagger-js class to handle file uploads.

@fehguy
Copy link
Contributor

fehguy commented Jul 11, 2014

Hi, after testing this, I'm not getting any content being sent to the server. If my memory serves correct, this is why we were using jQuery for file uploads. If you apply this patch, and try to upload to the petstore server (http://petstore.swagger.wordnik.com/api/api-docs), you will probably see this:

Uncaught TypeError: undefined is not a function shred.bundle.js:1243
createRequest shred.bundle.js:1243Request shred.bundle.js:847
Shred.request shred.bundle.js:388ShredHttpClient.execute swagger.js:1447
SwaggerHttp.execute swagger.js:1249
OperationView.handleFileUpload swagger-ui.js:1804
OperationView.submitOperation swagger-ui.js:1722
p.event.dispatch jquery-1.8.0.min.js:2
p.event.add.g.handle.h jquery-1.8.0.min.js:2

@aurelian
Copy link
Contributor Author

Right, I should have passed useJquery to true. Will adjust it the PR.
Thanks for reviewing this.

@mohsen1
Copy link
Contributor

mohsen1 commented Feb 26, 2015

@aurelian Please make a PR with your changes to develop_2.0 branch.

@fehguy
Copy link
Contributor

fehguy commented Feb 26, 2015

Actually this support has been added in 2.1.8-M1 or higher of swagger js. The front end code does not call it yet because of missing support for 1.2 spec file uploads in swagger-js. So I suggest closing this pr

@mohsen1 mohsen1 closed this Feb 26, 2015
@aurelian
Copy link
Contributor Author

Yup. Good to close it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants