Blob download is not working in IE Blob download is not working in IE angularjs angularjs

Blob download is not working in IE


Try this using, this or useragent

if (navigator.appVersion.toString().indexOf('.NET') > 0)        window.navigator.msSaveBlob(blob, filename);else{ var blob = new Blob(['stringhere'], { type: 'text/csv;charset=utf-8' }); var link = document.createElementNS('http://www.w3.org/1999/xhtml', 'a'); link.href = URL.createObjectURL(blob); link.download = 'teams.csv'; link.click();}


IE won't allow you to open blobs directly. You have to use msSaveOrOpenBlob. There's also msSaveBlob

if (window.navigator && window.navigator.msSaveOrOpenBlob) {    window.navigator.msSaveOrOpenBlob(blob, fileName);} else {    var objectUrl = URL.createObjectURL(blob);    window.open(objectUrl);}


I needed to use a Blob to download a converted a base64 PNG image. I was able to successfully download the blob on IE11 with window.navigator.msSaveBlob

See the following msdn link:http://msdn.microsoft.com/en-us/library/hh779016(v=vs.85).aspx

Specifically, you should call:

window.navigator.msSaveBlob(blobObject, 'msSaveBlob_testFile.txt');

where blobObject is a Blob created in the usual fashion.