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

Fixes DownloadManager for IE10 and above #4689

Merged
merged 1 commit into from
Apr 28, 2014

Conversation

timvandermeij
Copy link
Contributor

Fixes #4688.

It turns out that it is best to use navigator.msSaveBlob for IE10 and above (and possibly older versions, see https://stackoverflow.com/questions/20844644/why-am-i-getting-this-error-in-ie and https://stackoverflow.com/questions/16376161/javascript-set-file-in-download). Because of the feature test, this will only affect IE.

if (navigator.msSaveBlob) { // IE10 and above
var contentType = 'application/octet-stream';

// Convert data URI to Uint8Array for blob
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think if you will move the data to the downloadData, you don't have to parse the data URI.

@timvandermeij
Copy link
Contributor Author

/botio-linux preview

@pdfjsbot
Copy link

From: Bot.io (Linux)


Received

Command cmd_preview from @timvandermeij received. Current queue size: 0

Live output at: http://107.21.233.14:8877/cd77fae159a9941/output.txt

yurydelendik added a commit that referenced this pull request Apr 28, 2014
Fixes DownloadManager for IE10 and above
@yurydelendik yurydelendik merged commit 6c5a308 into mozilla:master Apr 28, 2014
@yurydelendik
Copy link
Contributor

Thank you

@timvandermeij timvandermeij deleted the ie-attachments branch April 28, 2014 21:32
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.

Downloading attachments fails in IE10/11
3 participants