What steps will reproduce the problem? 1. Upload to a subfolder of a bucket e.g. s3.AddObject(@"C:\MyFile.txt", "MyBucket/mysubfolder", "test-file");
What is the expected output? What do you see instead? file makes it into subfolder of a bucket
What version of the product are you using? On what operating system? 0.8.2, Server 2003
Please provide any additional information below. Most people (myself included) want to use this for uploading images to S3 for bandwidth improvements. To make for an easy transition to S3 I found using subfolders of a bucket to work best.
e.g. Value for images stored in the database are relative urls "~/images/cars/image1.jpg" when any image on the site is loaded is looks for a globalresource that has the domain name to point to where the images are. e.g. http://images.mysite.com/
Now to duplicate this on s3 you need a bucket to emulate you site root. http://bucket.s3.amazonaws.com/subfolder/subfolder/ this way you can just change the CNAME on you dns server and point it to you amazon bucket.
Comment #1
Posted on Feb 18, 2009 by Helpful RhinoThe second argument is just your bucket name. Everything else is based on your key, which is the third argument to the AddObject method. So your method call should look like this: s3.AddObject(@"C:\MyFile.txt", "MyBucket", "mysubfolder/test-file"); The file would then be accessible from http://MyBucket.s3.amazonaws.com/mysubfolder/test-file
Comment #2
Posted on Feb 18, 2009 by Massive OxThanks bkahle, that would definitely explain his problem. Did that solve your issue, joshnock?
Comment #3
Posted on Feb 18, 2009 by Helpful RhinoI think I had added a initial slash to the subfolder (s3.AddObject(@"C:\MyFile.txt", "MyBucket", "/mysubfolder/test-file");) and that is what was giving me the error.
It would be nice if there was a fourth parameter to set the ACL when uploading, and you could set it on a per file basis. I think that's already on your list.
Thanks for the help. Josh
Comment #4
Posted on Mar 3, 2009 by Massive Ox(No comment was entered for this change.)
Status: Invalid
Labels:
Type-Defect
Priority-Medium