Rails 4, Paperclip, Amazon S3 Config Amazon Path

前端 未结 3 455
再見小時候
再見小時候 2021-01-01 01:57

I\'m trying to configure the endpoint which is returned from paperclip when my object is successfully uploaded to Amazon\'s S3 service. The upload and everything is working

3条回答
  •  南笙
    南笙 (楼主)
    2021-01-01 02:20

    After some experimentation I have found that setting :s3_host_name globally suffices. I ended up with the same problem because I was setting :s3_region, which was being used by Paperclip (post-4.3.1, with aws-sdk 2) for storing attachments, but not when generating the URLs.

    This may also be of interest to readers who end up on this problem: https://github.com/thoughtbot/paperclip/wiki/Restricting-Access-to-Objects-Stored-on-Amazon-S3

提交回复
热议问题