My page, created using Drupal 7, will contain multiple galleries. I created new "Content Type" - "gallery" with an unlimited numer of "Image" fields. For each content of this type I want all of its images to be placed under different directory, eg. sites/default/files/gallery_01, sites/default/files/gallery_02, etc.

There is a "File directory" setting but I don't know how to make it content-dependent (when I create new content I want all uploaded images to be placed in a different directory).

Is there any way I can accomplish this ?

  • 1
    If this is not a hard-and-fast requirement, it will probably be much easier to just let Drupal automatically handle the storage for you. If you will be using Drupal to display all the images anyway, you won't need to worry about where the files are actually stored; Drupal will abstract that away from you. May 6, 2012 at 1:23

1 Answer 1


Why you would want to do that, I don't know. However, you can use Filefield Paths module with tokens. If you use the timestamp token you can have each directory created named based on timestamp. That will make them unique.

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.