8

I have a user who is uploading a number of files with the same file name. It is important to them that the files are never renamed. However, the files are getting _1, _2, etc on the end.

Is there a way I can ask Drupal to make a new directory for duplicate file names so that a rename is not necessary?

6

There are two ways you can do this:

  1. The Upload File Replace module. 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.

  2. Specify an optional subdirectory within the field setting where files will be stored using a unique token in the file path settings. (e.g. [current-date:raw])

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.