在这里我有控制器
require 'open-uri'
user = User.new
url = "some_remote_image.jpg" #remote image WITH extension
user.image = open(url)
user.save
模型
has_attached_file :image,
:styles => { :thumb => "25x25>", :large => "1000x1000>" },
:path => ":rails_root/images/users/:id/:style/:hash.:extension",
:url => "/images/users/:id/:style/:hash.:extension",
:hash_secret => "hash string"
这项工作,但图像存储没有扩展,例如。“一些远程图像。” 如果通过邮寄形式上传图片,则所有内容都上传 WITH 扩展名。我很困惑。