Repository navigation
fix: avoid batch name collisions when keeping both on paste and upload - #3697
Merged
Merged
Conversation
JammingBen
reviewed
Oct 13, 2026
JammingBen
left a comment
Member
There was a problem hiding this comment.
Works nicely. I noticed the same for uploading though, probably makes sense to fix it here as well.
Member
Author
|
@JammingBen Extended the fix to uploads: file and folder replacement names now account for the entire batch and previously assigned names, with regression tests for both. |
tammi-23
approved these changes
Oct 18, 2026
tammi-23
left a comment
Contributor
There was a problem hiding this comment.
Works as expected for paste and upload, including the upload fix requested by @JammingBen. LGTM 👍
# Conflicts: # packages/web-app-files/tests/unit/helpers/resource/actions/upload.spec.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Keeping both during paste or upload now resolves replacement names against existing target items, other top-level items in the same batch, and replacement names already assigned. For example, when the target contains a.txt and the batch contains a.txt and a (1).txt, the conflicting item becomes a (2).txt and the other item keeps its original name.
Uploads share the reserved names between files and folders. A replacement folder name is assigned once for all its children, preserving their shared destination and updating XHR and TUS endpoints consistently. Nested file names do not reserve names in the target folder.
Related Issue
How Has This Been Tested?
Types of changes