Uploading files to S3 bucket private and show files for client using CloudFront URL [carrierwaver]

50 Views Asked by At

We using the carrierwaver to uploads files to S3 on our system based on ruby. The uploaded file we need upload to an S3 private bucket, that URL show to client from cloudfront.

When we change config.aws_acl parameter to private, we can upload files do closed S3, but URL show with s3 signature and not the cloudfront url. If we use config.aws_acl public-read parameter, we cannot upload files, BUT the url is show corretly using the cloudfront URL get on S3_ASSET_URL

In resume

using private parameter on config.aws_acl we can upload to s3 private (block to public) BUT the URL show is s3.amazon... with signature

using public-reader parameter on config.aws_acl we cannot upload to s3 private (block to public) BUT the URL show the OK url from cloudfront set on S3_ASSET_URL

0

There are 0 best solutions below