Reputation: 6122
Is there a way to change the files directory path, using a function from the drupal api?
Thanks in advance,
—Albe
Upvotes: 2
Views: 1003
Reputation: 4194
EDIT: Failed initial reading comprehension. Answer:
variable_set('file_directory_path', 'path/to/files');
Drupal uses conf_path() . '/files'
as the default fallback value.
To change the location of the files directory itself, check out the File System configuration page at admin/settings/file-system. You can change the path of the files directory to any Drupal-writable path on your server.
If you mean, how do you change the path to which files are saved within the files directory, that depends on what you are using to do file uploads.
Upvotes: 4
Reputation: 21
Not sure about this exactly, but the module http://drupal.org/project/uploadpath lets you specify a different upload directory per node type.
Upvotes: 0