angular-file-saver icon indicating copy to clipboard operation
angular-file-saver copied to clipboard

demo doesn't work on iOS 9.1 and chrome browser

Open dohomi opened this issue 10 years ago • 14 comments

Hi,

just want to let you know that the current demo doesn't work on Google Chrome on iOS 9.1. Is this a known issue, can I run a test to try out if download is available?

Cheers!

dohomi avatar Oct 22 '15 15:10 dohomi

This package is just a convenient Filesaver.js & Blob.js wrapper for the Angular ecosystem. Unfortunately, Filesaver.js has some known issues in Safari. Which version of Chrome are you using? Could you test it on http://eligrey.com/demos/FileSaver.js? Thank you!

alferov avatar Oct 22 '15 15:10 alferov

Hi @alferov I tested the eligrey demo and there it works without problem. I don't find the version of chrome...

dohomi avatar Oct 22 '15 15:10 dohomi

Hhhm, interesting. Let me test it once I get home. Oh, you can check the Chrome version in Settings -> About.

alferov avatar Oct 22 '15 16:10 alferov

Ah yes: 45.0.2454.89

dohomi avatar Oct 22 '15 16:10 dohomi

Ok, thanks!

alferov avatar Oct 22 '15 16:10 alferov

I tested both Filesaver.js & this package on iOS 9 (in both Chrome & Safari) last night. Both Filesaver and angular-file-saver open new tab (which is fine due to iOS restrictions). But unlike angular-file-saver, Filesaver pre-fills that window with the saving content :anguished:

alferov avatar Oct 23 '15 13:10 alferov

All I'd think about it might be the click event ... Maybe try not using ng-click but the native click event? Not sure if it would make a difference? I'm pretty packed with work today, let me know if I can support you somehow

dohomi avatar Oct 23 '15 14:10 dohomi

Hi @alferov did you find out anything about this issue? I did lots of testing, it works well on almost every browser. Only chrome on iOS fails at the moment. Cheers

dohomi avatar Oct 27 '15 22:10 dohomi

Yes, I did. It's a problem with FileSaver.js itself. I created a dummy page, added FileSaver & Blob, and opened it on iOS 9.1. And guess what? I got the same issue. I'll upload it to gh-pages and open a new issue in the FileSaver repo tomorrow. Thank you for your contribution!

alferov avatar Oct 28 '15 00:10 alferov

BTW, version of the script used for the demo is not up to date: http://eligrey.com/demos/FileSaver.js/FileSaver.js

/* FileSaver.js
 * A saveAs() FileSaver implementation.
 * 2013-01-23

alferov avatar Oct 28 '15 00:10 alferov

Hi @alferov after upgrading to 1.0.0 your plugin doesn't work any more. I didn't change a line of code but now the Blob isn't recognized or generated any more:

Error: Data argument should be a blob instance
    at Object.FileSaverUtils.handleErrors 

I create the blob how you described it inside of the demo

dohomi avatar Oct 28 '15 09:10 dohomi

forget my previous statement... For sure I needed to update the saveAscall I didn't read the changelog.. All good again. Do you know the meaning of disableAutoBOM?

dohomi avatar Oct 28 '15 10:10 dohomi

By default, FileSaver prepends BOM to UTF-8 files. There is a nice explanation of the difference between these encodings on stackoverflow.

alferov avatar Oct 28 '15 15:10 alferov

Hi guys,

I'm pretty new to this so be gentle. I just ran into this issue on ios chrome. I followed along but lost the convo right around Oct. 27th due to me mostly being a newbie. Is this still a bug for ios chrome or did you guys find a solution?

DrMantisT avatar Feb 29 '16 23:02 DrMantisT