FileSaver.js
FileSaver.js copied to clipboard
FileSaver is not working in Safari+IFRAME
Hi all!
I have a problem here. I have a button (that download a file) inside an <iframe>.
If I open the src of this iframe in a new tab, FileSaver is working well, but, if I leave it inside the iframe, FilerSaver is not working.
It's like Safari doesn't allow us to create a file, if the file is being created inside an iframe.
If you want to reproduce it, do it:
- Create a
a.htmlwith a<iframe src="b.html"> - Create a
b.htmlfile with a button that download a file using FileSaver. - Open
a.htmlin your browser and press the button. FileSaver will not work :(
This could be a security restriction in the Safari browser. Can you provide a live example in JSBin or similuar?