problem with ACLChangeRequest

May 9, 2009 at 3:29 PM
Edited May 9, 2009 at 3:30 PM

Hey. I'm having a problem when trying to change the ACL for a file on S3. In particular, after performing an ACLChange, the file size of the file on S3 gets set to 0KB -- it seems like the file is being overwritten, or something.

Here's my code:

  ACLChangeRequest request = new ACLChangeRequest(bucketName, key, permission);
  ACLChangeResponse response = service.ACLChange(request);

where "service" is a ThreeSharp object and "permission" is set to either "public-read" or "private".

Any suggestions? I'm using the most up-to-date version of ThreeSharp.


May 29, 2009 at 7:25 PM
Edited May 29, 2009 at 7:25 PM

Same problem here, I ran the code above to update the ACL for a bunch of images, needless to say now I am in trouble, they are all 0Kb, lost them all. That is a TERRIBLE bug.



Jun 2, 2009 at 11:59 PM


Hey. If you look closely at the ThreeSharp ACLChangeRequest class, you'll see that the second constructor (the one you're callling) doesn't append the "?acl" query string to the request. This is a bug. To fix it, simply add "?acl" to the end of filename you're trying to change when you create a new ACLChangeRequest object. To reference my first post, the code should be:

  ACLChangeRequest request = new ACLChangeRequest(bucketName, key + "?acl", permission);
  ACLChangeResponse response = service.ACLChange(request);

Hope this helps.

Jun 3, 2009 at 10:45 PM

This bug caused me so much trouble, I ended up with several hundred images of 0 bytes.

Hopefully they will include your fix on the next release of the component.



Jul 1, 2009 at 2:16 PM

Same problem here.

I can't believe this hasn't been fixed yet.

Jul 6, 2009 at 9:26 PM

Just spent an hour trying to deal with this too! Would love to see this fixed.

Jul 6, 2009 at 10:16 PM

Yeah. This problem is really a pain.

As a temporary fix, be sure to append "?acl" to the file key when performing the ACLChangeRequest. This works.