eligrey / Blob.js

An HTML5 Blob implementation
Other
1.15k stars 605 forks source link

trying to use filesaver.js with blob.js in IE 8 #40

Closed jmsunseri closed 9 years ago

jmsunseri commented 9 years ago

So I'm trying to use blob.js from an IE 8 browser and I'm getting an error message that says Uint8Array is undefined.

After researching I saw this stack overflow post about someone having a similar issue with pdf.js saying typed arrays weren't supported. I've tried to include that snippit (above link) into my blob.js file but it still doesn't work complaining that it was expecting a function here

if (Uint8Array && (data instanceof ArrayBuffer || data instanceof Uint8Array))

Any help getting this to work on IE 8 would be greatly appreciated.

titomb345 commented 9 years ago

I've got the same issue, trying to use it in IE9. How deep must I go into the polyfill rabbit hole to make one simple, tiny little feature work in IE9? I hate IE9.......................................................................................................

jensaug commented 9 years ago

Me too :-(

Love the effort, but even the one basic example on the FileSaver.js GitHub page will result in "ReferenceError: 'Uint8Array' is undefined" JS error. How do we use Blob.js in IE8/9?!

antoniogiroz commented 9 years ago

I have same problem with Uint8Array in IE9.

Any solution?

eligrey commented 9 years ago

See https://github.com/eligrey/FileSaver.js/#supported-browsers and https://github.com/eligrey/FileSaver.js/#ie--10. Full API support is impossible in IE8 without Flash/ActiveX/other plugins.

eligrey commented 9 years ago

@jensaug @algil That demo isn't up to date. Are you are having any Uint8Array problems in IE10+? Shift-click on the relevant line numbers on https://github.com/eligrey/Blob.js/blob/master/Blob.js and link it here.

langman10 commented 9 years ago

I am having the same issue in IE9---at least, I think it is with Blob.js. I am trying to use jspdf.js which relies on FileSaver.js.

I attempt to run the simple code at this link, but I catch the error " 'Uint8Array' is undefined " on the simple line doc.save("c:\test.pdf");

I can help debug this more, if needed, with a little direction.

Mike

eligrey commented 9 years ago

@langman10 https://github.com/eligrey/Blob.js/issues/40#issuecomment-96043828

sswam commented 7 years ago

Thanks for filesaver :) I have a fallback if filesaver.js doesn't work: bounce it off the server. I'm more concerned that the stated feature detection "!!new Blob" succeeds on IE8. I changed my code to test for Uint8Array also:

    try {
        var isFileSaverSupported = typeof Uint8Array != 'undefined' && !!new Blob;
    } catch (e) {}