[英]images uploaded to s3 via PaperClip not displaying in my rails app
I have a rails app that allows users to upload photos via paperclip to s3. 我有一个Rails应用程序,允许用户通过回形针将照片上传到s3。 While uploading works fine, when I try to display the image all I see is the image name... 虽然上传效果很好,但是当我尝试显示图像时,我看到的只是图像名称...
<%= image_tag @user.photo.url(:thumbnail) %>
looking at the image properties the url is: http://s3.amazonaws.com/mybucket/thumbnail/imagename.png?12982847 查看图片属性的网址是: http : //s3.amazonaws.com/mybucket/thumbnail/imagename.png?12982847
How do I make my image display in my rails app? 如何在Rails应用程序中显示图像? and how do I change/hide the s3 url? 以及如何更改/隐藏s3网址?
Thanks~! 谢谢〜!
You need to set the ACL . 您需要设置ACL 。
Regarding the domain, you can setup a CNAME domain (can be any domain) which will point to your S3 bucket . 关于域,您可以设置一个CNAME域(可以是任何域) ,该域将指向您的S3存储桶 。
are you using S3fox? 您在使用S3fox吗? if so, try setting the permissions on the folder so that anyone can read the file 如果是这样,请尝试在该文件夹上设置权限,以便任何人都可以读取该文件
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.