It seems that Storage API is potentially very useful, and could serve the same role as http://drupal.org/project/AmazonS3 but for Drupal 6, yet the documentation just describes how to install and configure the module, not specifically what it would do.

I know that work on the Drupal 6 version seems to have halted but I thought to open this issue to help anyone coming across the Storage API module and scratching their head - as I am doing :)

I have installed the module and set up a Container and Class for use with my Amazon S3 account - it seems to link up to my S3 bucket with no problems.... but then I hit the wall - how can I specify what files should be sent to the S3 bucket? I was expecting a new location to list in my site's File Uploads settings but haven't found any information as to how I would configure the site to now direct all uploads (including via image and filefields + say, imagecache images) to the S3 bucket....

This really is the missing link in documentation for this module, but it seems to be able to do this?!

Can someone pleeeeeaaassseee help me out by replying to this with some further insight/instructions when they have a moment?

Thanks guys!

Qasim

Comments

the_g_bomb’s picture

Status: Active » Needs review

Here's the way I got this to work. I used this in conjunction with locally installed ffmpeg and the bd_video module.

I enabled 2 services - Filesystem / Drupal and S3

I created 3 containers:
1. uploaded media
2. encoded media - serving
3. S3 bucket - serving

and then I created 2 classes for the Media, 1 for the uploaded media and 1 for the encoded media.
I add the uploaded media container to the Uploaded media class and add the encoded media and S3 containers to the encoded media class.
In the encoded class setup set S3 container to be the top most class container. This does seem to make a difference as I think the files move from bottom to the top and set the initial container to be the encoded media container.

In bd_video I set the Source class to be the Uploaded media class and the transcoded class to be the encoded class.

Now when I attach a video file to the bd_video content type the file gets uploaded into the Uploaded class and it sits there waiting for the cron to run and the media to transcoded.

When the media get processed it gets copied into the encoded class by bd_video, which then syncronizes the file to S3.

In your case I would say create 1 class with 2 containers, 1 local and 1 on S3. Get your media field to upload the files into the local container, which should then sync up to S3.

When the media is output Storage_api should pick the S3 bucket to serve from, with the fallback that it will choose the local container if the S3 isn't available.

But I could be wrong.

Perignon’s picture

Issue summary: View changes
Status: Needs review » Closed (won't fix)

I am a new co-maintainer for Storage_API. Drupal 6 is coming toward end of life as soon as D8 is released which should be by the end of 2014. Due to that, I am going to be closing all 6.x issues as it's a hurdle too far to overcome with the amount of issues in the queue against this module.