FileSaver.js icon indicating copy to clipboard operation
FileSaver.js copied to clipboard

FileSaver is not working in Safari+IFRAME

Open NoelBroda opened this issue 9 years ago • 1 comments

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.html with a <iframe src="b.html">
  • Create a b.html file with a button that download a file using FileSaver.
  • Open a.html in your browser and press the button. FileSaver will not work :(

NoelBroda avatar Feb 07 '17 15:02 NoelBroda

This could be a security restriction in the Safari browser. Can you provide a live example in JSBin or similuar?

Ruffio avatar Jan 23 '18 06:01 Ruffio