Zooby
Zooby

Reputation: 11

What is the coldfusion code to upload a file in amazon s3 api?

I am having a problem trying to figure out what is the proper coldfusion code to upload a simple file into amazon s3 api. Any help is much appreciated!!!

Upvotes: 1

Views: 1907

Answers (3)

robenrajan
robenrajan

Reputation: 355

<cfset s3bucket = "s3://yourbuketname/">
<cffile action="upload" filefield="filename" destination="#s3bucket#" nameconflict="makeunique" charset="utf-8" />

Upvotes: 0

Brian
Brian

Reputation: 1

Try this CFC: http://amazons3.riaforge.org/

Also, note that you may also access your objects via: http://bucketname.s3.amazonaws.com/name-of-the-object (example)

Upvotes: 0

Ciaran Archer
Ciaran Archer

Reputation: 12466

There is a good tutorial here. You'll need CF 9.0.1 however.

Prior to CF 9 you might be able to use this CFC that Barney Boisvert wrote.

Upvotes: 3

Related Questions