Ok fine, here it is, warts and all.

http://bin.cakephp.org/view/517863202

A few things to be aware of...

It requires two fields to be in your database table..

path
s3_url

Path is a relative path to your file from the videos folder.

So if you have

/files/videos/myvideo.flv

The path would be simply myvideo.flv

I know this is a bit weird, but it's how I've done it.

It uses a sha1_file hash as the filename when uploaded to s3.

And finally, if you change the path of your file, you'll need to empty
out s3_path as well if you want the new one to be uploaded.

Cheers,
Adam

On Apr 5, 11:40 am, "Jon Bennett" <[EMAIL PROTECTED]> wrote:
> Hi Adam,
>
> >  I used this class to do the heavy 
> > lifting:http://undesigned.org.za/2007/10/22/amazon-s3-php-class
>
> >  Then I created an S3 behaviour which reads the bucket login
> >  information from app/config/s3.php much like database confs. I'll
> >  probably share it later on down the track when I've cleaned it up a
> >  bit.
>
> I'd be really interested in seeing your behaviour etc, happily in an
> 'unclean' state if you'd like to share.
>
> cheers,
>
> jon
>
> --
>
> jon bennett
> w:http://www.jben.net/
> iChat (AIM): jbendotnet Skype: jon-bennett
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to