I have an option to upload the files into Amazon s3 in my website. When the user uploads the file, I am setting the acl using the putObjectFile
function.
In EditMode: How do I overwrite/update the acl for the file that I am updating without reuploading the file?
Is there any function which updates the acl of the exsisting file (object).
The solution is needed in PHP. Any links to sample code/or any other solutions are appreciated.
Have you looked at the Amazon's SDK for PHP.
You can use update_object
to update the ACL. http://docs.amazonwebservices.com/AWSSDKforPHP/latest/#m=AmazonS3/update_object
Or you can do it directly using the REST API if you prefer: http://docs.amazonwebservices.com/AmazonS3/latest/API/index.html?RESTObjectPUTacl.html.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With