2
我使用回形针和aws-sdk gems向AWS上传头像,但是当我在我的应用程序中渲染照片时,控制台给了我以下响应:将资源解释为图像,但使用MIME类型application/xml传输aws
Resource interpreted as Image but transferred with MIME type application/xml aws
下面是我的代码:
development.rb
config.paperclip_defaults = {
:storage => :s3,
:s3_credentials => {
:bucket => "appname-development",
:access_key_id => "##########",
:secret_access_key => "##########"
}
user.rb
attr_accessible :profile_picture
has_attached_file :profile_picture,
:styles => {
:big => '200x200>',
:small => '50x50#'
}
show.html.erb
<%= image_tag @user.profile_picture.url(:small) %>
我去S3控制台,并检查了我的照片,它们都具有内容类型图像/ JPEG的。 当我浏览互联网时,看起来没有人真的遇到过这个问题,有人知道发生了什么事吗?
谢谢。
对不起,那实际的修正是什么?我相信我遇到了同样的问题。 – KevinAdu