Skip to content

fix: keep upload batch out of uppy until it is prepared - #4327

Merged
JammingBen merged 1 commit into
mainfrom
fix/upload-batch-prepare-race
Nov 6, 2026
Merged

JammingBen merged 1 commit into
mainfrom
fix/upload-batch-prepare-race

Conversation

@JammingBen

Copy link
Copy Markdown
Member

Description

If another upload calls uppy.upload() while a batch is still being prepared, Uppy also uploads that batch's files too early. This can happen during vault encryption or folder creation. As a result, files could reach a vault before they were encrypted, or be uploaded before their parent folders existed.

  • A batch's files now stay out of Uppy's state for the whole preparation. Only the files that will actually be uploaded are added back, right before the upload starts.
  • "Cancel all" during preparation drops the batch. The batch's files can be dropped again right away.
  • If preparation fails (e.g. an encryption error), the batch is dropped instead of leaving unprepared files in Uppy.
  • Dropping a file that failed earlier is rejected while the upload it belonged to is still running. Before, this broke that upload, and the file was reported as uploaded without being uploaded.

Related Issue

@JammingBen JammingBen self-assigned this Nov 6, 2026
@JammingBen
JammingBen marked this pull request as ready for review November 6, 2026 07:01
@JammingBen
JammingBen force-pushed the fix/upload-batch-prepare-race branch from 2252eab to 0a5e744 Compare November 6, 2026 09:17
@JammingBen
JammingBen merged commit 1cc5441 into main Nov 6, 2026
28 checks passed
@JammingBen
JammingBen deleted the fix/upload-batch-prepare-race branch November 6, 2026 12:08
@openclouders openclouders mentioned this pull request Nov 6, 2026
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Concurrent upload can start a batch's files before vault encryption and folder creation finish

2 participants