Skip to content

fix(uploader): preserve batch upload destination across navigation#2128

Open
joshtrichards wants to merge 2 commits into
nextcloud-libraries:mainfrom
joshtrichards:fix-batch-upload-destination-preservation
Open

fix(uploader): preserve batch upload destination across navigation#2128
joshtrichards wants to merge 2 commits into
nextcloud-libraries:mainfrom
joshtrichards:fix-batch-upload-destination-preservation

Conversation

@joshtrichards

@joshtrichards joshtrichards commented Jul 23, 2026

Copy link
Copy Markdown

Came up while looking into nextcloud/server#58352 (which was partially / fully addressed indirectly by not using `batchUpload() any longer in nextcloud/server#60519)

Summary

Snapshot the uploader root when batchUpload() starts and propagate it through recursive directory and file uploads.

This prevents a shared uploader destination change—for example, when a user navigates to another folder—from redirecting files that are already part of an active batch upload.

Changes

  • Capture the initial uploader root at batch start.
  • Use that root for batch metadata, WebDAV client setup, directory creation, and recursive file uploads.
  • Add regression coverage for changing the uploader destination while conflict resolution is pending.

This aligns batchUpload() with the explicit-root behavior already used by the Files app’s external drop handling:

https://github.com/nextcloud/server/blob/master/apps/files/src/services/DropService.ts#L139

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

Snapshot the uploader root when batchUpload starts and pass it through recursive directory and file uploads. This prevents a shared uploader destination change from redirecting remaining files in an active batch.

Should fix: nextcloud/server#58352

Assisted-by: Copilot:GPT-5.6

Signed-off-by: Josh <josh.t.richards@gmail.com>
Signed-off-by: Josh <josh.t.richards@gmail.com>
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.

1 participant