function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
saiisaii 

Update Acess control list (ACL) in s3

Hi

I am Uploading the file  in the amazon s3 when am uploading the file access controller  for file is  is Private 

And when am trying to update the Acl  using the restapi am getting the error has signature does not match.

when am trying to update the Acl  iam getting the 403 error forbiiden(Signature does not match)

I am able to Fetch the acl   value byu using the Get Method .but when am trying to Put the Acl am facing this error am sending the main code can  help me

 

HttpRequest con = new HttpRequest();
con.setMethod('PUT');
con.setEndPoint('https://s3.amazonaws.com/'+BUCKET+'/'+FILENAME+'?acl');

con.setHeader('x-amz-date', HIDATE );
con.setHeader('Authorization',AUTHORIZATION);

con.setHeader('x-amz-acl', public-read);

//Response From the Amazon
Http http = new Http();
HTTPResponse res = http.send(con);