rails-engine / homeland

Community Rails Engine
https://homeland-app.herokuapp.com/homeland
MIT License
316 stars 57 forks source link

上传图片如果文件名是中文时会出现错误 #6

Closed huacnlee closed 8 years ago

huacnlee commented 14 years ago

Started POST "/photos?tiny=1" for 125.69.59.41 at 2010-09-13 21:20:30 +0800 Processing by PhotosController#create as HTML Parameters: {"utf8"=>"✓", "authenticity_token"=>"8JXDdsC2IfMrz3rEJh1UMgEiHfETDDzVyBN64eh6oDE=", "image2"=>#File:/tmp/RackMultipart20100913-24448-ccpj96, "tiny"=>"1"} [paperclip] identify -format %wx%h '/tmp/stream,24448,1.png[0]' [paperclip] convert '/tmp/stream,24448,1.png[0]' -resize "100>" '/tmp/stream,24448,1,24448,0' [paperclip] identify -format %wx%h '/tmp/stream,24448,1.png[0]' [paperclip] convert '/tmp/stream,24448,1.png[0]' -resize "680>" '/tmp/stream,24448,1,24448,1' Completed in 1268ms

Encoding::CompatibilityError (incompatible character encodings: ASCII-8BIT and UTF-8): app/controllers/photos_controller.rb:63:in block in create' app/controllers/photos_controller.rb:60:ineach' app/controllers/photos_controller.rb:60:in `create'