I don't want Drupal to add incremental numbers to my file names to make them unique. I want to always have files stored with the same name they had when I uploaded them.

If the file with given name already exist, "Replace already existing file?" prompt should appear instead of default behaviour.

  • Hello and welcome. It seems English is not your first language. It is not my first language, either ;) So to be sure: You want to have "Replace file?" dialog instead of default behaviour: number appended to filename to make it unique? And you want to always have files stored with the same name they had when you uploaded them? – Mołot Oct 23 '13 at 7:22
  • Yes you are absolutely clear with the requirement Mołot – Astha chauhan Oct 23 '13 at 8:22
  • I edited it for you, hope it will attract more attention (and answers) now. As we can see with NWOM's answer, your question was easy to misunderstood, but I think we have it figured out. Good luck! – Mołot Oct 23 '13 at 8:32

The Upload File Replace module should do the trick:

Module Page Description

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.

Edit: Sorry, I missed the part where you are expecting a prompt. According to the comment below, it is not possible.

| improve this answer | |
  • There are two issues with it: 1) it does not provide a dialog, it overwrites silently, and 2) 7.x-1.0-beta1 worked very, very unstable for me (messing managed files table et cetera). Can't tell about dev from 2013-Oct-19 - maybe it's better now? – Mołot Oct 23 '13 at 7:25
  • @NWOM Files are still getting renamed after using this utility,I think i am missing something please suggest? – Astha chauhan Oct 24 '13 at 6:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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