Drupal 6 storing files in non-relative to install path location and accessing via a different subdomain
I've searched around 开发者_如何转开发about this, but I can't find a clean solution. I'd like to develop a module for Drupal 6 that will allow me to have the /sites/default/files directory configured so:
- File uploads are uploaded to a folder on the server that IS NOT a path relative to the drupal install path
- Links are accessed publicly via a different or sub-domain
I'm assuming I need to hook several File interface functions including file_directory_path and file_create_url, though I'm unsure of which functions to hook.
It should be possible to use a absolute path (instead of the default relative one) in the file system settings at admin/settings/file-system.
Displaying a different link might be more complicated, not sure how to do that in D6. I'd suggest having a look at http://drupal.org/project/cdn or a similar module to see what they're doing.
精彩评论