How To Set Acl For An Object While Uploading It To Amazon S3?
i can upload images from Android to Amazon s3. But they are always private, no one can display them. i have to make it public on Amazon s3 management console. i can not set ACL for
Solution 1:
Bucket policy seems to be the simpliest thing. You can specify some path or give permission for all objects in you bucket. You can set it using AWS console (Bucket properties -> Permissions -> Edit bucket policy) or CloudBerry Explorer (Bucket properties -> Bucket Policy). Is it suit for your need?
{
"Version": "2008-10-17",
"Statement": [
{
"Sid": "",
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::bucketname/*",
"Condition": {}
}
]
}
Post a Comment for "How To Set Acl For An Object While Uploading It To Amazon S3?"