Reputation: 11
I'm trying to download a file from the browser.
In JS I try to create a Blob from the data I get returned from the server but in IE11 the Blob is undefined and therefore cannot be created.
JS fails in this line with error : 'Blob' is undefined
Works correctly in Chrome and Firefox.
var blob = new Blob([data], {'type':"application/csv"});
Any suggestions?
Upvotes: 1
Views: 5867
Reputation: 6124
The Blob object is available from IE10 (included), see: https://developer.mozilla.org/en/docs/Web/API/Blob
So it should be working, anyhow if you need to support lower versions, there's a polyfill - https://github.com/eligrey/Blob.js/
Edit: make sure you're not running IE11 emulating an older version (F12).
Upvotes: 1