File downloads (blob) are not processed
Brilliant app! Thanks.
It seems that your app is unable to perform file downloads and it would be great if it could. Please see the details and my use case below.
I'm accessing a local HTML file I wrote myself (URL: http://127.0.0.1:XXXXX/506!/[local_path]), which is a standalone single-file note taking app written in HTML, CSS and JS.
So say the file is called "notes.html". When I click a download button in my HTML app it will trigger the below JS function to download self. On Chrome (Android) this will create a blob and output a new html file in the Downloads folder, like this: "notes (1).html".
But in your app nothing happens, the app is closed and no file is downloaded.
My download code (JS in my html file):
function downloadSelf(file_name, file_type) {
updateJSONdata();
var data = "<!DOCTYPE html>\n<html>\n" + document.documentElement.innerHTML + "\n</html>";
var file = new Blob([data], {type: file_type});
if (window.navigator.msSaveOrOpenBlob)
window.navigator.msSaveOrOpenBlob(file, file_name);
else {
var a = document.createElement("a"),
url = URL.createObjectURL(file);
a.href = url;
a.download = file_name;
document.body.appendChild(a);
a.click();
setTimeout(function() {
document.body.removeChild(a);
window.URL.revokeObjectURL(url);
}, 0);
}
}
I did manually enable the Files and media permission in your app but it had no effect.
I'm on Android 11 / Motorola Moto G60s with near-stock version of Android.
Can this be related to a user agent? I'm keeping it at default.
Alternatively, if this is a limitation of your app could you consider extending it so that file downloads are possible?
Thank you.
I noticed downloads are basically not supported right now. App seems to crash whenever a download is initiated.