Drupal default file upload path is sites/default/files. How this default path change for a particular content type? Consider an example.. My drupal installation directory is ../drupal then all the files uploaded in inside location ../drupal/sites/default/files I have created a content type "test", I would like upload all test content file in the location ../drupal/test


The public filesystem is a system-wide setting; it can't be different per content type.

There's a setting under every file field attached to your content types that will allow you to choose the sub-folder within public:// that files for that field are uploaded to.

As an extension you can get a more advanced version of that functionality with the File (Field) Paths module...but beware, there are issues with it and you'll need to test thoroughly before deploying to a live site.

One of those methods will likely be your best bet. There's lots more info at Working with Files in Drupal, including documentation on how to use the private file system (in case you can leverage that).

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.