Writing ACLs to S3 Objects using ThreeSharp?

Nov 11, 2007 at 11:32 PM
Are there plans (or an existing solution) for applying ACLs to S3 objects using the ThreeSharp library?
Nov 12, 2007 at 5:38 AM
I should have read the S3 docs more carefully... here's how it works, in case anyone else is looking for a sample...

ObjectAddRequest request = new ObjectAddRequest(_bucketName, key);
request.Headers.Add("x-amz-acl", "public-read");
Dec 13, 2007 at 10:28 PM
Maybe a future version of this could include something in ThreeSharpWrapper.cs that does this? It seems like a pretty common use case.

I wrote this:

public void AddPublicFileObject(String bucketName, String keyName, String localfile)
{
ObjectAddRequest objectAddRequest = new ObjectAddRequest(bucketName, keyName);
objectAddRequest.LoadStreamWithFile(localfile);
objectAddRequest.Headers.Add("x-amz-acl", "public-read");
ObjectAddResponse objectAddResponse = base.service.ObjectAdd(objectAddRequest);
objectAddResponse.DataStream.Close();
}
Mar 28, 2008 at 4:33 PM
@jeffreymcmanus, I dropped that exact method into the ThreeSharpWrapper class, rebuilt and am using it constantly at this point.