I uploaded an image which I know already exists. FileField Image module didn't overwrite the existing image but renamed the file second file.
Original filename logo_mediapost.gif became logo_mediapost_0.gif.
The problem is in UI file is displayed as the original filename but it actually links to the renamed image. See attached image.
| Comment | File | Size | Author |
|---|---|---|---|
| 7162008_111218 AM.png | 12.4 KB | osman |
Comments
Comment #1
osmanDrupal 6.3
CCK 6.x-2.0-rc4
FileField 6.x-1.0-beta3
FileField Image 6.x-1.0-beta2
Comment #2
jpetso commentedThat is the intended behavior - Drupal should not overwrite other files without consent of the user, so if there are two files with the same name then one has to be renamed. So we can't hide the renamed filename, but we can still keep its presentation in the user interface as close to original as possible, so the original filename is shown. Drupal's {files} table even has two different columns for this: "filepath" for the real, possibly renamed path on the server, and "filename" for the original name.
Filefield behaves like Drupal core in this regard, and as far as I know, no one intends to change this behavior because of consistency and because it works sufficiently well. If you want this changed, please file an issue with core instead of filefield.
Comment #3
capellicI am going to request that this be a configuration option when creating a FileField field. Why? Because sometimes I have links to that file from other nodes or websites.
Thank you for the consideration.