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

Add file download to try operation #1079

Merged
merged 4 commits into from
Mar 26, 2015
Merged

Conversation

mohsen1
Copy link
Contributor

@mohsen1 mohsen1 commented Mar 26, 2015

No description provided.

@fehguy
Copy link
Contributor

fehguy commented Mar 26, 2015

@mohsen1 this will fail if there is any sort of header/key applied in fetching the file. Can you fetch the bytes in an AJAX call with SwaggerHttp and set them in an iFrame for download?

@mohsen1
Copy link
Contributor Author

mohsen1 commented Mar 26, 2015

response.url should have the API key in it, shouldn't it?

It's also possible to use Blob but it's IE10 plus and I feel it's redundant because setting window.location works perfectly if the key is in the URL.

@fehguy
Copy link
Contributor

fehguy commented Mar 26, 2015

If a query param, yes. If it's a header (which is most common), I don't know of a way to do that.

We could detect headers in the swagger.authorizations and do "something different"

@mohsen1
Copy link
Contributor Author

mohsen1 commented Mar 26, 2015

I don't know any other option. I'm open to ideas

@fehguy
Copy link
Contributor

fehguy commented Mar 26, 2015

Here's suggestion. Let's use the blog support, and give an alert message if it's not supported? We cannot support every possible version of every browser, but we can gracefully degrade when support is not there, especially for an advanced feature like this.

@mohsen1
Copy link
Contributor Author

mohsen1 commented Mar 26, 2015

@fehguy added support for Blob

fehguy added a commit that referenced this pull request Mar 26, 2015
Add file download to try operation
@fehguy fehguy merged commit f9db063 into swagger-api:develop_2.0 Mar 26, 2015
vincent-zurczak pushed a commit to roboconf/swagger-ui that referenced this pull request Aug 18, 2016
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

Successfully merging this pull request may close these issues.

None yet

2 participants