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

Add custom suffix to conflict name #1425

Merged
merged 3 commits into from Nov 22, 2023

Conversation

zatteo
Copy link
Contributor

@zatteo zatteo commented Nov 21, 2023

No description provided.

This reverts commit e6f9721.

This fix was not usable because we can not know every possible format regex.
So it is not usable in the real world.

BREAKING CHANGE: It is not possible anymore to pass a name format regex to generateNewFileNameOnConflict
Check if there are _X inside AND at the end of a filename, that at
the end it gets correctly incremented.
Sometimes, files are named like they already had a conflict like
IMG_001.JPG. It is a normal name but in this case, previous
implementation would consider _001 as a conflict suffix and would
return IMG_2.JPG whereas we expect IMG_001_1.JPG.

By allowing to pass a custom delimiter, we can avoid this issue by
renaming during a conflict IMG_001 for example to IMG_001_cozy1.jpg.
So no more issues due to '_' confusion.
@zatteo zatteo merged commit cfce692 into master Nov 22, 2023
4 checks passed
@zatteo zatteo deleted the feat/add-custom-suffix-to-conflict-name branch November 22, 2023 08:25
Merkur39 added a commit that referenced this pull request Nov 22, 2023
Following the development of @zatteo on the
improvement of the "generateNewFileNameOnConflict" function (#1425),
we can take advantage of it to also offer the option in the
"uploadFileWithConflictStrategy" function which uses the latter.
Merkur39 added a commit that referenced this pull request Nov 22, 2023
Following the development of @zatteo on the
improvement of the "generateNewFileNameOnConflict" function (#1425),
we can take advantage of it to also offer the option in the
"uploadFileWithConflictStrategy" function which uses the latter.
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.

None yet

2 participants