2
我的模型:問題將照片上傳到亞馬遜S3時使用回形針
has_attached_file :avatar, :styles => { :thumb => "65x65>" },
:storage => :s3,
:s3_credentials => "#{RAILS_ROOT}/config/s3.yml",
:bucket => "doweet-image",
:path => ":attachment/:id/:style.:extension"
當我的圖片上傳到Amazon S3,並把該上的觀點:
<%= image_tag(current_user.avatar.url(:small))%>
照片做不顯示,當我複製鏈接src這張照片這是:
http://s3.amazonaws.com/doweet-image/avatars/1/small.jpg?1311356386
當我去鏈接我到那裏這個錯誤:
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<Error>
<Code>AccessDenied</Code>
<Message>Access Denied</Message>
<RequestId>152EBFC9033E6633</RequestId>
<HostId>
Iw3zWXuCC6JjPAJig+pBVqQbLilN4dmTY4VooVO5CVKCH3O/MN3VDawXbI6Zd5NP
</HostId>
</Error>