Hello.
We are experimenting problems with a file download on a PWA (Progressive Web App)
In our PWA, we have a button which downloads an Excel file.
In Safari the download is working correctly, but when we execute de PWA (by clicking on the icon of the PWA, previously installed with the opcion "share -> Add to home screen") the download doesn't work.
- In the headers of our PWA, we have this goals:
<meta name = "mobile-web-app-capable" content = "yes">
<meta name = "apple-mobile-web-app-capable" content = "yes">
- This is javascript code that button is executing:
let anchor = document.createElement ('a');
document.body.appendChild (anchor);
anchor.setAttribute ('download', file);
anchor.href = window.URL.createObjectURL (this.response);
anchor.click ();
anchor.remove ();
Could you tell us what the error is and how to solve it?
Is it possible, to download a file from a PWA? How?
Thanks in advance.