Question

This could be very trivial, but I haven't been able to find a good solution.
I have an image field associated with a content type called article, and I wish to organize the files uploaded during content creation in a way that they go to a sub folder (within files/article) which uses the day's date as name.
For example, if the article is created on April 15, then the associated images (the ones added through the image field) go to files/articles/15-04-2011/filename.jpg; the articles created the day after will have their associated files in files/article/16-04-2011/filename.jpg.

Was it helpful?

Solution

You can use the Filefield Paths module to automatically rename uploaded files according to a scheme defined by tokens. The node creation date is one of the available tokens, so that module should be able to do what you want to achieve.

Licensed under: CC-BY-SA with attribution
Not affiliated with drupal.stackexchange
scroll top