1

When using FileField or ImageField, files are saved to a local folder in the Drupal install. This works great and all, but up till now the media files on my website are served from a discrete server (a CDN), and I'd really like to keep them separate.

Is there a module that extends File/ImageField to allow you to specify an external server (FTP and credentials) to use as a file server?

Any advice or pointers with this is appreciated.

(Ps I've seen the CDN module, but that requires the use of a server daemon or modifying the CDN's origin... and I'm not particularly fond of either implementation.)

<3

  • Did you complete this task? – Cindrella Oct 16 '12 at 8:15
  • @Mohini No, we ended up settling on a "solution" I am too embarrassed to share. :) (Hint: It involved a lot of manual processes.) – Todd Oct 16 '12 at 22:03
  • Did you used custom module. What kind of solution did you resolved to. Please let me know. – Cindrella Oct 17 '12 at 4:21
5

As far as I know, there is no other way to do this in Drupal 6 than what CDN does.

In Drupal 7, this is a completely different story, however. Drupal 7 uses stream wrappers when dealing with files and it is a) possible to implement custom stream wrappers with PHP code and b) the stream wrapper can be chosen per file/imagefield.

So if it is possible to access X with PHP (FTP, Flickr, Amazon S3, ..) then it should be possible to write a stream wrapper for it and therefore allowing Drupal to write the files to that place.

This probably doesn't help you in your situation, but maybe it will help someone else, when deciding to use Drupal 6 or 7 for a new project for example :)

2

It may be too powerfull and quite complex to set up but have you tested Media Mover ?

If you have shell access on your server, you may be interested in File Conveyor, a Python Daemon written by Wim Leers, a well know Drupal contributor. Of course after setting this up you'll have to rewrite your files URL to point to your CDN.

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.