Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 Refile gem 在带有 Rails 4 的 S3 上上传图像。使用我当前的设置,我只能在手动更新 ACL 后通过 S3 URL 查看图像。
有没有办法配置 Refile gem 将 ACL 参数设置为 public_read?
我现在可以通过将 S3 存储桶策略更新为此来访问图像:
{ "Version": "2008-10-17", "Statement": [ { "Sid": "AllowPublicRead", "Effect": "Allow", "Principal": { "AWS": "*" }, "Action": "s3:GetObject", "Resource": "arn:aws:s3:::MY_BUCKET_NAME/*" } ] }