Can data in indexedDB be streamed to local disk?

In saving indexedDB database to local disk, I’ve been extracting pieces of data as an array of blobs and then combining them into one final large blob for download to the local disk.

This sometimes takes up a bit of RAM to build and hold the blob for download and several months ago I tried using the stream API but couldn’t figure out how to get to the download event to stream to it. I also tried to use the web request API but since this all takes place on the client and a data URL is not intercepted by the web request, I couldn’t get it to work either. Trying to use web request on a local web page doesn’t work either because the part of the content header to change for a download is never reached for a local page load.

Is there any way to do this? Specifically, I mean can a download be started and then write data in chunks, as retrieved from indexedDB, and write it directly to the download stream, as opposed to building a large file of all the indexedDB data and then downloading it?

I’ve seen several similar questions on stackoverflow but none have answers that use only extension APIs.

Thank you.

1 Like