Closed Jack-Edwards closed 1 month ago
I intend to create a NuGet package for this issue. If anyone else gets to it first, please drop a link here!
Edit: I may not be working on this after all. Time constraints.
Proton also has a good implementation. They add an Iframe to the page, instead of depending on a separate, static site to host the service worker.
Proof of concept is working on this branch: https://github.com/Crypter-File-Transfer/Crypter/tree/feature/streamed-downloads
Remaining work:
Blocked by #717
Resolved! These changes are currently in the stable
branch.
Description
The primary reason for limiting file transfers to 100 MB is to accommodate mobile browsers. The majority of mobile browsers are still 32-bit, meaning they are limited to 2 GB of memory.
Currently, the sequence of events for downloading an encrypted file goes:
A 100 MB file may actually have a 300 MB memory footprint. The last thing I want is for an
OutOfMemoryException
to occur during file downloads.Now consider this answer from SO: https://stackoverflow.com/a/39685380
and this repository: https://github.com/jimmywarting/StreamSaver.js
It should be possible to perform streaming downloads. Which means a much smaller memory footprint during download; potentially up to an arbitrary chunk size. Which means I could drastically increase the file transfer size limit.