Uploading duplicate file may lose data
stasiana - January 9, 2008 - 22:43
| Project: | Attachment |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
Create a new node, then upload a file to it. The page will show only one instance of that file uploaded. Now save. Now edit the node and attach the same file to it again. Save again. Now the node will show two entries with the same filename and with the same download link.
Now edit the node again and delete one of the duplicate instances. Save the node. You have now removed the file from the server, but the node now still lists the "remaining" duplicate attachments which have invalid links of "http://localhost/drupal//active//".
You have just lost data without knowing it.

#1
#2
This actually has been fixed:
http://drupal.org/node/64742
The real issue here is the change didn't get picked up by the release for download. I'll investigate and fix that in the next few days or so.
In the mean time, I recommend downloading from CVS and using that. It has the fix applied.
I'll keep this issue open until I fix the release on the project page.
- Steve