tpyo/amazon-s3-php-class

There's no support for setting canned ACLs

hardev opened this issue · 2 comments

You're able to pass canned ACLs to putObject and putObjectFile, but there's no way to set an existing file's canned ACL. You have to set an AccessControlPolicy (which is more complex). You can see a sample canned ACL for an existing object at the end of this link https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPUTacl.html

Had to write my own function to do this. If anyone else needs it here it is:
https://pastebin.com/VhNPnuX4

@hardev the existing putObject ACL's are working for you today in november? For us it no longer works.