[GH-ISSUE #305] replace files #224

Closed
opened 2026-03-02 15:57:00 +03:00 by kerem · 3 comments
Owner

Originally created by @ivavid on GitHub (Feb 14, 2020).
Original GitHub issue: https://github.com/prasathmani/tinyfilemanager/issues/305

When uploading files with the same name already present, the file is not replaced, but instead the uploaded filename is suffixed with the date and time.

For example, uploading index.html, it is renamed to index_200214144111.html if index.html is already present. I expect it to replace the file.

How can this behavior be changed so that same name files get replaced? I couldn't find anything in the Wiki about it.

Originally created by @ivavid on GitHub (Feb 14, 2020). Original GitHub issue: https://github.com/prasathmani/tinyfilemanager/issues/305 My question seems to be related to the behavior described in issue #138. Basically, I'm asking for file replacement behavior. ------ When uploading files with the same name already present, the file is not replaced, but instead the uploaded filename is suffixed with the date and time. For example, uploading `index.html`, it is renamed to `index_200214144111.html` if `index.html` is already present. I expect it to replace the file. How can this behavior be changed so that same name files get replaced? I couldn't find anything in the Wiki about it.
kerem closed this issue 2026-03-02 15:57:00 +03:00
Author
Owner

@EV-soft commented on GitHub (Feb 14, 2020):

Try change:
$override_file_name = false;
to
$override_file_name = true;
at / near line 782

@prasathmani ?:
billede

<!-- gh-comment-id:586330877 --> @EV-soft commented on GitHub (Feb 14, 2020): Try change: `$override_file_name = false;` to `$override_file_name = true;` at / near line 782 @prasathmani ?: ![billede](https://user-images.githubusercontent.com/21997911/74550833-56c6c080-4f52-11ea-89d6-ef3b16239c26.png)
Author
Owner

@ivavid commented on GitHub (Feb 22, 2020):

that worked. thanks!

<!-- gh-comment-id:590005146 --> @ivavid commented on GitHub (Feb 22, 2020): that worked. thanks!
Author
Owner

@it-toppp commented on GitHub (May 15, 2022):

How can overwrite be activated when copying files or directories?

<!-- gh-comment-id:1126918181 --> @it-toppp commented on GitHub (May 15, 2022): How can overwrite be activated when copying files or directories?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/tinyfilemanager#224
No description provided.