3

How to set up the image field in a content type so that it always overwrites images with the same name instead of creating new images with name suffix _0, _1 etc. Currently, while editing a node and uploading image with the same name as existing one, it won't overwrite.

If it is impossible, then how to achieve it programmatically (hook, hack?) without help of any additional modules, just using the core image field.

1 Answer 1

3

Its not there -- this functionality has been discussed on Drupal.org and ruled out by the maintainer of the filefield module before because it could cause the original file to be deleted before the node is saved. You can follow their argument here:

http://drupal.org/node/427212

Fortunately, if you do want the file to be replaced when you upload a new one with the same name there is an alternate module you can add for 6x/7x called Upload File Replace that does this and avoids the issue above:

http://drupal.org/project/upload_replace

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.