Subsribe to our RSS

latest reactions

Montana Flynn
haha …
some1
Hi, Thank you for help me testing my sit …
metin2 yang
it is very nice …
Tjarko
I would'nt use cfhtmlhead for anything ; …
Sebastiaan
Hi Tjarko,Would you suggest injecting…

Use OpenDNS

mxna feeds

A Special ColdFusion Builder Event in Tampa, FLColdFusion Contract Job in Marbella, SpainColdFusion Job Opportunity in West London, United KingdomColdFusion Job Opportunity in Bethesda, MDColdFusion Job Opportunity in Springfield, MOColdFusion Job Opportunity in Seattle, WAColdFusion Builder - RefactoringColdFusion Job Opportunity in Raleigh, NCColdFusion Job Opportunity in Quincy, MAColdFusion Job Opportunity in Memphis, TNColdFusion Job Opportunity in San Antonio, TXUsing Base64 Canvas Data In jQuery To Create ColdFusion ImagesMy move from using cfhttp and rssatom.cfc to cffeed.Infinite entities, cfgrid and one cfc to handle the dataJob: ColdFusion Developer - Marbella, Spain

All files are strictly confidential: all information is classified.
© Copyright 2002 - 2010 mximize.com.
All right reserved.

MXNA webfeed

Visit Carlos GallupaPowered by ColdFusion MX

s3 REST wrapper with ACL and storage choice

Based on the wonderful wrapper that Joe Danziger build about a year ago and the update that Steve Hicks made, I made the wrapper with extra storage choice. You can now choose if you want your bucket stored on the US data storage or in my case the European data storage.

Download the new and improved s3 REST wrapper

The modified code now takes into account the ACL and the STORAGE:

    * putBucket(bucketName, acl, storage) - create a new bucket with the defined ACL and storage.

I have also modified the S3test.cfm so that it includes a drop down for the storage choice US or EU.

The s3.cfc now also takes into account the 307 redirect "error" you get when using EU storage. All the methods have changed to work with the "new-style" REST API and the 307 redirect. The 2 functions that get this "error" are deleteBucket and putObject, i haven't tested the deleteObject code but if this doesn't work just copy/paste the 307 bit from the other methods.

Enjoy!! And if someone could improve the code that would be even better!! This was a quick fix and it could probably improve here en there :-)

UPDATE: I forgot to mention that I don't use the getObject method to get my files... so that method is not working in this exampel. I use the host mybucket.s3.amazonaws.com/filelocation way of getting to the file.

3676 viewed | 3 opinion(s)  | del.icio.us | Digg it | Tjarko @ 14/11/07 12:04 cet


Reactions:

Tom wrote.... (site)

Carlos

Thanks for further developing the wrapper and making it suitable for the European users of Amazon S3.

Steve was working on that for me.. but now he can get back to the main application.

TomC
www.s3dashboard.com

11 December 2007 10:33 cet  

Charlie Arehart wrote.... (mail)

Carlos, it seems Steve Hicks moved his page since you offered that link to his blog entry. It's now at:

http://www.stevehicksonline.com/2007/06/04/amazon-s3-rest-wrapper-with-added-acl/

11 February 2008 21:19 cet  

Tjarko wrote.... (site)

Thanks Charlie!! I changed the link, he probably fixed the little type in the old link ;-)

11 February 2008 22:20 cet  

Leave your comment

Your name


Your url/website/link/email....


Some room for your reaction is placed here..



The answer to the ultimate question is?? (42 ;-))




URL en mail addresses are translated for you... life sometimes is that simple!!