在使用jQuery-File-Upload在 Rails 中上传多个文件的教程之后 ,一旦将属性:multiple => true添加到 file_field 中,似乎就会出现问题,例如
<%= f.file_field :path, :multiple => true %>
出现以下错误:
Started POST "/pictures" for 127.0.0.1 at 2012-06-20 18:50:51 +0100
Processing by PicturesController#create as JSON
Parameters: {"utf8"=>"✓", "authenticity_token"=>"hcMORNvY1Rx/tbHv8wB+hLKzS92Nez5qHdgHXfcq+Nc=", "picture"=>{"path"=>[#<ActionDispatch::Http::UploadedFile:0x007fa183ba1a18 @original_filename="001.jpg", @content_type="image/jpeg", @headers="Content-Disposition: form-data; name=\"picture[path][]\"; filename=\"001.jpg\"\r\nContent-Type: image/jpeg\r\n", @tempfile=#<File:/var/folders/xq/dq4fkqnx0m36htfgdj2lxlb00000gn/T/RackMultipart20120620-60459-yeso39>>]}}
Completed 500 Internal Server Error in 1ms
Paperclip::AdapterRegistry::NoHandlerError (No handler found for [#<ActionDispatch::Http::UploadedFile:0x007fa183ba1a18 @original_filename="001.jpg", @content_type="image/jpeg", @headers="Content-Disposition: form-data; name=\"picture[path][]\"; filename=\"001.jpg\"\r\nContent-Type: image/jpeg\r\n", @tempfile=#<File:/var/folders/xq/dq4fkqnx0m36htfgdj2lxlb00000gn/T/RackMultipart20120620-60459-yeso39>>]):
app/controllers/pictures_controller.rb:14:in `create'
有没有人遇到过这个问题的解决方案?
Rails:3.2.5,回形针:3.1.2,浏览器:Chrome 版本 19.0.1084.56,操作系统:Mac OS X 10.7.4