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

Added 'Overwrite Files' Checkbox to Give Users the Option of Overwriting Existing Files During Upload #1140

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

uwecmyersjj
Copy link
Contributor

@uwecmyersjj uwecmyersjj commented Jan 31, 2024

This would be an optional checkbox users could choose to use in the case they want to overwrite uploaded files if there is already one that matches the same filename.

filemanager-overwrite-checkbox

@ner00
Copy link
Contributor

ner00 commented Jan 31, 2024

Haven't tested this, but in theory it's a worthwhile addition.

Just a nitpick: keep the code formatting in line with the current style, for example:

if ($overwrite_files == 'Y') {
    $fullPathTarget = $path . '/' . basename($fullPathInput, $ext_1) . $ext_1;
} else {
    $fullPathTarget = $path . '/' . basename($fullPathInput, $ext_1) .'_'. date('ymdHis'). $ext_1;
}

@nerun
Copy link
Contributor

nerun commented May 26, 2024

Tested and works like a charm with version 2.5.3! Easy to implement. Thank you!

@nerun
Copy link
Contributor

nerun commented Jul 2, 2024

Suggestion, to be able to translate:

Replace

  •  Overwrite existing files? by
  • &nbsp;<?php echo lng('Overwrite existing files?') ?>

Add around line 4310

  • $tr['en']['Overwrite existing files?'] = 'Overwrite existing files?';

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.

3 participants