File Upload Conflict Prompt & Rename fm_is_exclude_items #1315
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.
Enhanced from my previously closed PR #1312. Closes #938 (technically already closed), Closes #1211
First off, I've refactored
fm_is_exclude_items
tofm_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.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