Update 1.8.release
webviewextra should now allow you to download files from blob urls. You will not get a notification like you do with ordinary downloads, and because blob urls generally do not have a filename, a filename is created using the format file_currentMilliseconds.ext.
This functionality has taken over two years to apply, much digging and searching on the internet finally resolved with this post in July 2024
Download the file with blob URL in Android WebView - Tech Blogs
I asked Brave for a howto to create a blob and download it using javascript. it came up with this:
JavaScript Blob Download
To generate a Blob URL and trigger a download in JavaScript, follow these steps:
Create a Blob
Use the Blob constructor to create a binary object from your data, specifying a MIME type:
const data = "Hello, world!";
const blob = new Blob([data], { type: "text/plain" });
Generate a Blob URL
Use URL.createObjectURL() to create a temporary URL referencing the Blob:
const blobUrl = URL.createObjectURL(blob);
Trigger the Download
Create a temporary <a> element, set its href to the Blob URL and download attribute to the desired filename, then simulate a click:
const link = document.createElement("a");
link.href = blobUrl;
link.download = "downloaded-file.txt";
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
Revoke the URL
Free memory by revoking the URL after the download:
URL.revokeObjectURL(blobUrl);
This method works across modern browsers and supports various file types (text, JSON, images, etc.). For large or frequently generated files, always revoke URLs to prevent memory leaks.
See here for a working example:
