I have this in my Angular.js controller that downloads a CSV file:
var blob = new Blob([csvContent.join('')], { 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();
This works perfectly in Chrome but not in IE. A browser console log says:
HTML7007: One or more blob URLs were revoked by closing the blob for which they were created. These URLs will no longer resolve as the data backing the URL has been freed.
What does it mean and how can I fix it?
Maybe you need some delay. What about with:
Try this using,
this
oruseragent
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:
where
blobObject
is a Blob created in the usual fashion.Try to use this instead : var blob = file.slice(0, file.size);
What's your IE browser version? You need a modern browser or IE10+ http://caniuse.com/bloburls
IE won't allow you to open blobs directly. You have to use
msSaveOrOpenBlob
. There's alsomsSaveBlob