Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compress chunks during upload #457

Open
jis260 opened this issue Aug 13, 2020 · 1 comment
Open

Compress chunks during upload #457

jis260 opened this issue Aug 13, 2020 · 1 comment

Comments

@jis260
Copy link

jis260 commented Aug 13, 2020

EvaporateJS is a great library and this is not an issue, but a question on how one might implement compression during upload?
This would need to avoid loading the entire file into memory and instead perform the compression as part of the file streaming.
It would be great if you could provide some pointers on where this could be implemented?

@jakubzitny
Copy link
Collaborator

When you work with File objects, the file is preloaded into memory by browser automatically. If you want to compress it before sending it over, you have to do it before initiating the File upload. You take the Blob data from the File, do whatever compression you like, and then send the resulting Blob to the upload process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants