Skip to content
This repository has been archived by the owner on Nov 20, 2018. It is now read-only.

Fix s3 pause/continue chunked multiple bug. #1796

Closed
wants to merge 3 commits into from

Conversation

JohnTheGray
Copy link

Reproduce:
s3.XhrUploadHandler
options:
, chunking: { enabled: true, concurrent: { enabled: true } }
, maxConnections: 3
, multiple: true
, resume: { enabled: true}

Chrome: Version 56.0.2924.87 (64-bit) (also on Edge)

Begin uploading a large file. Pause and continue the upload a few times
and notice that immediately or eventually (it's sporadic) the upload will
be paused but chunks will still upload in the background.

Solution: the paused state is not cleared on upload continue. initHeaders
promise success seems to be called even though the XHR is aborted. Added
file status pause check here to prevent an XHR PUT when file hsa been
paused.

John Gray added 2 commits March 21, 2017 11:34
Reproduce:
s3.XhrUploadHandler
options:
, chunking: { enabled: true, concurrent: { enabled: true } }
, maxConnections: 3
, multiple: true
, resume: { enabled: true}

Chrome: Version 56.0.2924.87 (64-bit)

Begin uploading a large file. Pause and continue the upload a few times
and notice that immediately or eventually (it's sporadic) the upload will
be paused but chunks will still upload in the background.

Solution: the paused state is not cleared on upload continue. initHeaders
promise success seems to be called even though the XHR is aborted. Added
file status pause check here to prevent an XHR PUT when file hsa been
paused.
This is handy since we can know what percentage is uploaded by
loaded/size. Useful to initialise progress bars for resumable files.
@@ -118,7 +118,8 @@ qq.XhrUploadHandler = function(spec) {
name: uploadData.name,
remaining: uploadData.chunking.remaining,
size: uploadData.size,
uuid: uploadData.uuid
uuid: uploadData.uuid,
loaded: uploadData.loaded

This comment was marked as spam.

@rnicholus rnicholus closed this Nov 8, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants