Defect #3691

Redmine allows two files with the same file name to be uploaded to the same issue

Added by Derek McCallum about 13 years ago. Updated over 12 years ago.

Status:ClosedStart date:2009-07-29
Priority:NormalDue date:
Assignee:-% Done:


Target version:1.0.0 (RC)
Resolution:Fixed Affected version:0.8.4


If you upload two files with the same name to an issue ticket, it allows you to do so instead of enforcing uniqueness. However, it ends up creating one file on the filesystem and has two entries in the attachments table pointed to the one physical file on the filesystem. The one file on the file system gets written over so it actually ends up being the last duplicate file attached. So if you decide to delete one of the duplicate files via the interface, you end up with an orphaned link on the ticket.

Redmine 0.8.4
Rails 2.1.2
Ruby 1.8.6

Associated revisions

Revision 3511
Added by Jean-Philippe Lang over 12 years ago

Fixed: attachments with the same name at the same time overwrite (#3691).


#1 Updated by Derek McCallum about 13 years ago

I want to also clarify that you have to try to upload two documents within the same batch to replicate this issue. If you upload one document and then come back later to "update" the ticket with the second document named the same, it works without causing an issue. It appears that documents uploaded within the same batch have the same leading identiying number in the disk_filename thus allowing the issue reported above.

#2 Updated by Jean-Philippe Lang over 12 years ago

  • Status changed from New to Closed
  • Target version set to 1.0.0 (RC)
  • Resolution set to Fixed

Fixed in r3511.
The 2 uploaded files are now saved under 2 physical files.

Also available in: Atom PDF