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

@uppy/tus: fix resumeFromPreviousUpload race condition #5616

Merged
merged 1 commit into from
Jan 22, 2025

Conversation

Murderlon
Copy link
Member

Closes #5615

Copy link
Contributor

Diff output files
diff --git a/packages/@uppy/tus/lib/index.js b/packages/@uppy/tus/lib/index.js
index 4556f3b..33884db 100644
--- a/packages/@uppy/tus/lib/index.js
+++ b/packages/@uppy/tus/lib/index.js
@@ -327,8 +327,8 @@ function _uploadLocalFile2(file) {
         this.uppy.log(`[Tus] Resuming upload of ${file.id} started at ${previousUpload.creationTime}`);
         upload.resumeFromPreviousUpload(previousUpload);
       }
+      queuedRequest = this.requests.run(qRequest);
     });
-    queuedRequest = this.requests.run(qRequest);
     eventManager.onFileRemove(file.id, targetFileID => {
       queuedRequest.abort();
       this.resetUploaderReferences(file.id, {

@Murderlon Murderlon merged commit e329bfa into main Jan 22, 2025
16 checks passed
@Murderlon Murderlon deleted the tus-previous-uploads branch January 22, 2025 15:22
github-actions bot added a commit that referenced this pull request Jan 22, 2025
| Package         | Version | Package         | Version |
| --------------- | ------- | --------------- | ------- |
| @uppy/aws-s3    |   4.2.3 | @uppy/tus       |   4.2.2 |
| @uppy/companion |   5.5.1 | uppy            |  4.13.1 |

- @uppy/tus: fix resumeFromPreviousUpload race condition (Merlijn Vos / #5616)
- @uppy/aws-s3: Fixed default shouldUseMultipart (Mika Laitinen / #5613)
- meta: build(deps): bump docker/build-push-action from 6.11.0 to 6.12.0 (dependabot[bot] / #5611)
- @uppy/aws-s3: remove console.error (Mikael Finstad / #5607)
- @uppy/companion: unify http error responses (Mikael Finstad / #5595)
Murderlon added a commit that referenced this pull request Jan 23, 2025
* main: (38 commits)
  Release: [email protected] (#5617)
  @uppy/tus: fix resumeFromPreviousUpload race condition (#5616)
  @uppy/aws-s3: Fixed default shouldUseMultipart (#5613)
  build(deps): bump docker/build-push-action from 6.11.0 to 6.12.0 (#5611)
  @uppy/aws-s3: remove console.error (#5607)
  @uppy/companion: unify http error responses (#5595)
  Release: [email protected] (#5605)
  @uppy/aws-s3: always set S3 meta to UppyFile & include key (#5602)
  @uppy/companion: fix forcePathStyle boolean conversion (#5308)
  Fix Webpack CI (#5604)
  @uppy/aws-s3: allow uploads to fail/succeed independently (#5603)
  Revert "@uppy/aws-s3: allow uploads to fail/succeed independently"
  @uppy/aws-s3: allow uploads to fail/succeed independently
  Add types for css files (#5591)
  @uppy/unsplash: make utmSource optional (#5601)
  build(deps): bump docker/setup-qemu-action from 3.2.0 to 3.3.0 (#5599)
  build(deps): bump docker/build-push-action from 6.10.0 to 6.11.0 (#5600)
  @uppy/companion: add COMPANION_TUS_DEFERRED_UPLOAD_LENGTH (#5561)
  Release: [email protected] (#5590)
  Import types consistently from @uppy/core (#5589)
  ...
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

Successfully merging this pull request may close these issues.

@uppy/tus does not wait for the findUploadsByFingerprint Promise to resolve before calling addUpload
1 participant