Opened 11 years ago
Last modified 5 years ago
#11398 new enhancement
Existing attachments can be overwritten without warning when uploading through trac-admin
Reported by: | Ryan J Ollos | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | next-major-releases |
Component: | admin/console | Version: | |
Severity: | normal | Keywords: | attachment bitesized |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
For example, both commands return success:
$ trac-admin $env attachment add wiki:WikiStart file1 $ trac-admin $env attachment add wiki:WikiStart file1
We could perhaps prompt with an "Are you sure you want to overwrite the existing file?".
Attachments (1)
Change History (13)
comment:1 by , 11 years ago
Milestone: | next-stable-1.0.x → 1.0.3 |
---|
comment:2 by , 11 years ago
Owner: | set to |
---|---|
Status: | new → assigned |
comment:3 by , 10 years ago
Milestone: | 1.0.3 → next-stable-1.0.x |
---|---|
Owner: | removed |
Status: | assigned → new |
comment:4 by , 10 years ago
Keywords: | bitesized added |
---|---|
Milestone: | next-stable-1.0.x → next-dev-1.1.x |
by , 9 years ago
Attachment: | wiki-upload-multiple-times.png added |
---|
comment:5 by , 9 years ago
comment:7 by , 9 years ago
I just tried, without any patch, running the command twice would automatically add a suffix, with the new filename prompted out.
trac-admin test attachment add wiki:test2 ~/file_list.txt
04:40:49 Trac[attachment] INFO: New attachment: wiki:test2: file_list.txt by trac
trac-admin test attachment add wiki:test2 ~/file_list.txt
04:40:55 Trac[attachment] INFO: New attachment: wiki:test2: file_list.2.txt by trac
comment:8 by , 9 years ago
Thank you for investigating. It seems I have been inattentive and created a false report.
I wonder though if we should echo a message, both for TracAdmin and the web ui, when the attachment is auto-renamed.
comment:9 by , 9 years ago
Another consideration: for authenticated users uploading through the web form there is an option Replace existing attachment of the same name. Perhaps we should have an equivalent option from the command line (--overwrite
or --force
).
comment:10 by , 9 years ago
Milestone: | next-dev-1.1.x → next-dev-1.3.x |
---|
Narrowing focus for milestone:1.2. Please move ticket to milestone:1.2 if you intend to fix it.
comment:12 by , 5 years ago
Milestone: | next-dev-1.5.x → next-major-releases |
---|
Is it ok if we just add a suffix for the filename, if the file with same name was uploaded before (like the current wiki web page did)?