Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 89864

AWS S3 Object Permissions when saved a file using PutObject() in an Xamarin.Forms app

$
0
0

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.


Viewing all articles
Browse latest Browse all 89864

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>