0

I am using Refile gem to upload images on S3 with Rails 4. With my current settings, I am able to view the images through S3 URL only after updating the ACL manually.

Is there any way to configure Refile gem to set the ACL params to public_read?

Simmi Badhan
  • 493
  • 1
  • 5
  • 16

1 Answers1

0

I am able to access the images now by updating the S3 bucket policy to this:

{
    "Version": "2008-10-17",
    "Statement": [
        {
            "Sid": "AllowPublicRead",
            "Effect": "Allow",
            "Principal": {
                "AWS": "*"
            },
            "Action": "s3:GetObject",
            "Resource": "arn:aws:s3:::MY_BUCKET_NAME/*"
        }
    ]
}
Simmi Badhan
  • 493
  • 1
  • 5
  • 16