How to download blob file from Chrome iOS to Javascript?
I am working on download files (pdf, excel, txt, png) from iOS. iOS does not have file systems, which is a problem to download. I am creating code that downloads a blob file depending on the OS and navigator, if necessary. It works great on the desktop (latest versions of Chrome and IE), Mobile Android (Chrome, native navigator) and iOS iPad2 (Safari).
Now Chrome iOS should look like Safari mobile, but the algorithm does not work, Chrome iOs downloads the file, opening it in a new tab, but the page is empty.
I create my own blob to create downloadUrl.
This is part of the download function.
var URL = window.URL || window.webkitURL; var downloadUrl = URL.createObjectURL(iobBLOB); var newWindow = null; if (typeof a.download === 'undefined') { var newWindow = null; newWindow = window.open(downloadUrl, '_blank'); setTimeout(function() { newWindow.document.title = isbFilename; }, 10); }
More details
Debugging on iPad 2 and iPhone 4
Attempt to download excell, pdf, txt and png files.
Devices do not have a file system.
Thank you for helping me ... Tell me if you need more information, this is my first question.
source share