-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Doesn't works in Safari browsers #26
Comments
@vinay07-gl, it seems like that issue has been resolved: |
Hi, I have tested it with version 1.1.2 on Safari and I get the same issue. Also the demo at the bottom of the page http://alferov.github.io/angular-file-saver/ opens file in the browser on Safari. |
Hi, @Lamorale , please use below code, and it should work. Only limitation would be that the file downloaded will have no name or extension. In case of safari browser you can ask the users to name the downloaded file. In case you are still getting this error, I am guessing that you are using the Safari on Windows, because it happens only in Windows Safari, and works as i said on Mac Safari. Please note that, normally any user will only use Safari on Mac. So please once test it on any Mac machine and it should work. req.onload = function (event, header) { |
Thanks for your very quick answer. |
I'm currently experiencing the same issue when testing in Safari and I've tried vinay07-gl's snippet of code but that still results in the text being opened in a new tab. JS
Maybe I'm placing the snippet in the wrong place? HTML
|
@vinay07-gl Your code snippet breaks IE - nothing happens. |
Any news on that? I've tried 1.1.3 and type |
I know this is an old thread but the problem still occurs on Safari 11 and 12 on MacOS. However, you only see the problem in a pinned tab. Try pinning http://alferov.github.io/angular-file-saver/ on Safari 11/12 then click the download button in the Demo. FWIW, I think this is a Safari bug. I have been trying to find a workaround but haven't found one yet. Setting mimetype to "application/octet-stream" does download the file, however it always has the filename "unknown.txt" or "unknown.dms" which is a very big (show stopping) limitation. The only real workaround I have is to tell our users not to pin the tab but this is not really an acceptable solution. |
Have tested the library in all Browsers successfully except Safari. It just doesn;t works in Safari and instead opens the file directly in browser. I have to download Zip content. Is there a way to download a file from JavaScript Blob in Safari Browsers
The text was updated successfully, but these errors were encountered: