haaroad.blogg.se

Ios safari download attribute
Ios safari download attribute












Is there maybe a way to skip the whole client side of things and make the browser download the file directly from there?ĭoes anyone have another idea on how to download PDF’s on mobile IOS (e.g. I’m generating the PDF in a Google Cloud Function. All of these methods in most browsers just doe nothing or open the PDF blob in the same page instead of downloading it or opening it in a new tab (as file-saver states it would do on IOS). I’ve tried file-saver, downloadJ, creating an anchor tag myself together with the download attribute, using the application/octet-stream mime-type and several other solutions posted on the internet. In any other browser (opera, firefox and chrome) it doesn’t seem to work. Funnily enough it works fine in safari (it opens a dialog that asks me to download and then downloads it without opening it). it jus opens on the same page (not wanted). file-saver doesn’t, as stated in on the GitHub page, open the blob in a new Page either. But I don’t seem to be able to download a file on IOS. The library generally works fine on desktop and android. I’m using file-saver in my angular application to download a PDF generated in my backend.














Ios safari download attribute