problem with ACLChangeRequest

May 9, 2009 at 4:29 PM
Edited May 9, 2009 at 4: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.

Thanks!

May 29, 2009 at 8:25 PM
Edited May 29, 2009 at 8: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 3, 2009 at 12:59 AM

Bolitcha:

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 11: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.

Thanks!

 

Jul 1, 2009 at 3:16 PM

Same problem here.

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

Jul 6, 2009 at 10:26 PM

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

Jul 6, 2009 at 11: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.