使用s3 heroku和paperclip存储图像 .

我通过回形针在我的实时应用程序上创建了一个图像,它保存到s3但图像在视图上被破坏了 .

页面上用于损坏图像的html是:

http://s3.amazonaws.com/spreeas/users/profileimages/000/000/001/medium/ios.png?1401311581

s3上相同图像的位置是:

https://s3-eu-west-1.amazonaws.com/spreeas/users/profileimages/000/000/001/medium/ios.png

HTML更新:

<a href="/profiles/1">
                <img alt="Missing" class="pull-left" height="25" width="25" <img="" src="http://s3.amazonaws.com/spreea/users/profileimages/000/000/001/medium/ios.png?1401311581">
                &nbsp; yesterday            
              </a>

附加文件更新:

has_attached_file :image, :styles => { :large => "640x640>", :medium => "309x309>", :thumb => "100x100>", :convert_options => "-auto-orient" }

AWS配置更新:

config.paperclip_defaults = {
    :storage => :s3,
    :s3_credentials => {
    :bucket => ENV['AWS_BUCKET'],
    :access_key_id => ENV['AWS_ACCESS_KEY_ID'],
    :secret_access_key => ENV['AWS_SECRET_ACCESS_KEY']
  }
}

测试:

我创建了一个新的存储桶,图像URL如下所示,它似乎只是将'?1401317319'添加到图像路径的末尾: http://s3.amazonaws.com/spreeab/sprees/images/000/000/004/large/wizkid.jpg?1401317319 任何想法?

任何人都可以在这里帮忙,不太确定如何让回形针生成正确的路径,以便图像不被破坏?谢谢大家,任何帮助表示赞赏 .