shiri
shiri

Reputation: 11

IE11 'Blob is undefined' error

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

Answers (1)

George Kagan
George Kagan

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

Related Questions