Skip to content
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

JS error when testing uploadFile method (http://petstore.swagger.io/#!/pet/uploadFile) #1132

Closed
wing328 opened this issue Apr 9, 2015 · 3 comments

Comments

@wing328
Copy link

wing328 commented Apr 9, 2015

When testing the uploadFile method (http://petstore.swagger.io/#!/pet/uploadFile) in Swagger-UI, I only provided the required field: petId set to 5, clicked "Try it out" but didn't get any response.

Found JS error in the console:

screen shot 2015-04-09 at 2 24 01 pm

@webron webron added this to the v2.1 milestone Apr 9, 2015
@webron webron added the P2 label Apr 9, 2015
@xhh
Copy link

xhh commented Apr 14, 2015

I got a similar error when I tried it with all fields filled and file selected:

Uncaught TypeError: window.authorizations.apply is not a function
    SwaggerUi.Views.OperationView.Backbone.View.extend.handleFileUpload @ index.js:24
    SwaggerUi.Views.OperationView.Backbone.View.extend.submitOperation @ index.js:24
    p.event.dispatch @ jquery-1.8.0.min.js:2
    g.handle.h

btw, no request is sent at all, I guess the js error prevents it

@fehguy
Copy link
Contributor

fehguy commented Apr 14, 2015

@mohsen1 can you please look at this regression?

@mohsen1
Copy link
Contributor

mohsen1 commented Apr 15, 2015

53966f7 fixed this. We're using jQuery for file upload which should change. For that #1164 is filed

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

No branches or pull requests

5 participants