Drupal 6: Filefield deletes old version of updated images
Here's the scenario: I have admins updating images uploaded via CCK filefield. I also have emails going out daily with an imagecached version of those images.
So when an admin updates an image, filefield del开发者_开发技巧etes the old image and adds the new image (renaming it - (adding a _0 at the end) if the filename is the same as before).
All fine and good in normal situations, but what happens to the images referenced in the previous emails that went out prior to the update? They disappear, leaving an unprofessional looking placeholder or gap (depending on the email client viewing them).
Is there any way I can set filefield to not server-delete the old images after an update?
In the case of an updated image of the same filename, it would ideally just overwrite the old image without changing the name, though that isn't as important as the first point.
The Upload File Replace (for filefield CCK) module should do what you need. Some more details about this module (from its project page):
This is a small utility module that automatically stops Drupal from renaming new files upload via filefield CCK. When 2 files with the same name exist, the older files will be renamed.
精彩评论