I am working on a news portal site. We have a lot of posts and also a lot of pictures are saved daily.

At the moment, the size of /sites/default/files directory is around 6GB and contains almost 23k files. And that is a problem.

What I want is to have directory for every month, for example:


Does anybody know how to do this?
Also, is there a way to keep live posts working?


I solved this problem using this module: https://www.drupal.org/project/filefield_paths You can change path for every field type and use tokens like /[date:custom:Y]/[date:custom:m] to achive what I wanted...

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.