When using FileField Paths for overwrite of original file with same name, file still has _0 attached. When one edits the node, then saves, without editing anything, the _0 is removed.
Configuration:
Using Filefield paths with a custom cck text field token replacement.
Token is [field_custom_txt_field-formatted].[filefield-extension-original] and the user is expected to enter the name of the original file in [field_custom_txt_field-formatted] and then this will keep the resource at the same URL (or another) regardless of updates. The bug is that if user has uploaded foo.pdf and then sets the [field_custom_txt_field-formatted] as 'foo' and then uploads 'foo.pdf' to the filefield again (same filename different pdf content) , the first pass results in 'foo_0.pdf'. If one re-edits the node, makes no changes, saves, the result is the expected 'foo.pdf', and no appended _0.
Minor bug.
Any thoughts anyone?
L
Comments
Comment #1
spcalpo commentedI'm having this issue as well. i don't have any immediate suggestions, though, but am subscribing in hopes someone will.
Comment #2
maxiorelHaving the same problem too. It is very problematic when using Insert + Colorbox. The result is the Colorbox is done with an URL to image file which doesn't exists.
Comment #3
bollerfant commentedSame problem like #2. But also more than this:
I added a file path 'images-book' for my image-fields of my bookpages. So my steps are:
1. create a bookpage and upload a image (if i would now press insert, the path would be /files/image.jpg but WITHOUT the /images-book/). so i save the bookpage.
2. drupal automatically moves the picture to /images-book/
3. edit the bookpage and press insert -> the path which is added is correct (/files/images-book/image.jpg), but when i hit save the filename itself changes to image_0.jpg. so the path which is inside of the code of the bookpage is wrong.
4. i have to open the node again and save. now the picture is renames image.jpg again...
Comment #4
tacituseu commentedHave a look at #1172724: References are corrupted when destination file already exists. May be related.
Comment #5
decipheredNo longer supporting Drupal 6 issues for this module.