Handling browser limitations on Blob storage #94
-
|
Hi, I was wondering what's the general recommendation to handle the blog storage limitation? I have read that on Chrome, 500 MiB is the max amount of data that can be stored? In that case, I'd like my app to be able to handle situations in which the zip might be more than that. Before I try to implement my own logic to handle this, does this really apply to zips created by If yes, here's my plan:
Would this be a correct approach? If yes, how can I check for the current size of the zip or should I use my current file size to determine the size of the zip? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
|
If you're using ZIP streams you don't even need to do this, you can save memory by not accumulating into a blob and instead piping to zipReadableStream.pipeTo(streamSaver.createWriteStream('filename.zip'))I've tested this on multi-gigabyte files, works like a charm with very low memory usage. |
Beta Was this translation helpful? Give feedback.
If you're using ZIP streams you don't even need to do this, you can save memory by not accumulating into a blob and instead piping to
streamsaver. You can do the following:I've tested this on multi-gigabyte files, works like a charm with very low memory usage.