Skip to content

Conversation

MarkIvanowich
Copy link

Enhanced from my previously closed PR #1312. Closes #938 (technically already closed), Closes #1211

First off, I've refactored fm_is_exclude_items to fm_is_excluded. The logic was backwards from what the function name implied. I've inverted any reference to the previous function name. (commit ce1d720)

Just at in my previous PR, this adds $upload_name_conflict_handling configuration option with the following options:

  • NEW : The newly uploaded file is renamed with a timestamp (current behaviour)
  • OLD : The old file is renamed with a timestamp, new file keeps desired name. (my recommended default)
  • REPLACE : The old file is deleted before the new file keeps the desired name.
  • Finally, PROMPT will leave the uploaded file as .part and trigger a conflict resolution dialog.

For the PROMPT option, Dropzone will listen for a successful upload with a 'conflict' status to launch the dialog. If multiple conflicting files are uploaded simultaneously, the user has the option to apply their choice to the whole queue of conflicting files. If the user closes the tab or chooses to cancel, the file will remain as .part

Again, if any of the uploaded files exist and are excluded items, the NEW option is fallback.

Approving this PR will create an issue to add six new lines to be translated. b99e6be

MarkIvanowich and others added 6 commits April 19, 2025 13:38
Added `$upload_name_conflict_handling` option for handling upload of files that already exist.
Additional checks to ensure an uploaded file is not on the `exclude_items` list.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Overwrite File not working BUG: upload a file with the same name of one already present in the filemanager
2 participants