When I save to a file using PutObject(), the file becomes private. So subsequent reads are denied access. How do I make it public?
My code is:
PutObjectRequest request = new PutObjectRequest { BucketName = EntBucketName.Text.Trim(), Key = FileName.Text.Trim(), ContentBody = FileContents.Text.Trim(), //CannedACL = S3CannedACL.PublicReadWrite, }; PutObjectResponse response = await App.awsS3Client.PutObjectAsync(request);
When I set CannedACL property, the PutObject fails with 'Access Denied' exception. When that is not included the file is overwritten but becomes private so subsequent GetObject fails.
Deleting the file and then saving to it also didn't help.