Closed EnTeQuAk closed 9 years ago
Rebased to use https://github.com/23/resumable.js/pull/36
I that ready to merge? I have no time today to test it. Let me know.
Thanks
No, it's not since it relies on another pull request on 23/resumable.js, except we distribute the library directly via the package instead of linking to the github page?
No objection. (One day I was thinking of rewriting a more clean resumable client library, don't realy like the code style and that there are no tests...)
@jeanphix this is a amazingly old PR but since the required code already landed in resumable.js it should be save to merge this :smile:
@EnTeQuAk Ok, lets merge it then :+1:
NOTE: This requires https://github.com/23/resumable.js/pull/36 as I introduced a size checking for each chunk to harden the server against network failures or browser reloads.
NOTE 2: I am working on adapting the unittests properly so this PR is basically to get early feedback from you so that I can probably adapt to other use cases as well.
Implementation:
We must not read the file contents into memory, especially if we deal with large amount of data which is the main use case of chunked uploads.
This commit fixes the old behavior and introduces a more efficient merging. We still read every chunk into memory but this happens in a generator and we do not merge in-memory so that the memory usage stays constant.