I want to store files from one filefield (or all files from sites/default/files) on a different server to reduce the traffic on my main server. It is a shared hosting so I can't mount a network drive.
I found one module (Storage API http://drupal.org/project/storage_api) that seems to be able to help me but I can't get it to work. If somebody knows another module that might do it, I'd appreciate a hint. If not, here is what I've done and what it does now.
Using Drupal 6, Storage API 6.x-1.2 and the filefield integration from http://drupal.org/node/1134868.
I created a container using the FTP service and a class with only that conainer. Serving is enabled for the FTP container. Now in the FTP directory two new directories were created: objects and files. I chose the storing class on the filefield and checked "Use Storage API for file storage". Now a copy of the files are stored on the FTP server when creating or updating a node. But they are placed in the objects directory and are named 1.bin, 2.bin, 3.bin etc. Also when viewing the node or a view with the files still the old local files are used.
How can I make it serve the files from the FTP server? Or, maybe the better question: What would be the usual way to do this in Drupal?
Thank you very much in advance for any hint or advice! steeph
A CDN maybe?
Nancy Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.
From: steeph
I want to store files from one filefield (or all files from sites/default/files) on a different server to reduce the traffic on my main server. It is a shared hosting so I can't mount a network drive.
Have you tried the CDN module (http://drupal.org/project/cdn)? I haven't used it yet but it pretty much allows you to serve images, css, js, etc from another server defined in your DNS settings.
Todd
On 16 Sep 2011, at 12:11, steeph wrote:
I want to store files from one filefield (or all files from sites/default/files) on a different server to reduce the traffic on my main server. It is a shared hosting so I can't mount a network drive.
I found one module (Storage API http://drupal.org/project/storage_api) that seems to be able to help me but I can't get it to work. If somebody knows another module that might do it, I'd appreciate a hint. If not, here is what I've done and what it does now.
Using Drupal 6, Storage API 6.x-1.2 and the filefield integration from http://drupal.org/node/1134868.
I created a container using the FTP service and a class with only that conainer. Serving is enabled for the FTP container. Now in the FTP directory two new directories were created: objects and files. I chose the storing class on the filefield and checked "Use Storage API for file storage". Now a copy of the files are stored on the FTP server when creating or updating a node. But they are placed in the objects directory and are named 1.bin, 2.bin, 3.bin etc. Also when viewing the node or a view with the files still the old local files are used.
How can I make it serve the files from the FTP server? Or, maybe the better question: What would be the usual way to do this in Drupal?
Thank you very much in advance for any hint or advice! steeph -- [ Drupal support list | http://lists.drupal.org/ ]
On 09/16/2011 06:42 PM, Todd wrote:
Have you tried the CDN module (http://drupal.org/project/cdn)? I haven't used it yet but it pretty much allows you to serve images, css, js, etc from another server defined in your DNS settings.
Thanks, I found this module first and thought it would be just what I imagined. But unfortunately I don't have any DNS settings.
Sounds that the real issue here is finding a better hosting solution.
On 09/16/2011 11:50 AM, steeph wrote:
On 09/16/2011 06:42 PM, Todd wrote:
Have you tried the CDN module (http://drupal.org/project/cdn)? I haven't used it yet but it pretty much allows you to serve images, css, js, etc from another server defined in your DNS settings.
Thanks, I found this module first and thought it would be just what I imagined. But unfortunately I don't have any DNS settings.
There are several CDN suppliers out there; the one a previous customer used was Akamai. What the module should do is to push the file to the CDN server and then update the URL to their server. The file would then be served from the closest server in their network, not yours.
Nancy Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.
From: steeph
Thanks, I found this module first and thought it would be just what I imagined. But unfortunately I don't have any DNS settings.