使用JQuery文件上载和回形针上载多个文件时出错

使用JQuery文件上载和回形针上载多个文件时出错,jquery,ruby-on-rails-3,paperclip,Jquery,Ruby On Rails 3,Paperclip,使用在Rails中进行多个文件上载之后,只要将属性:multiple=>true添加到file_字段,就会出现问题 <%= f.file_field :path, :multiple => true %> true%> 出现以下错误: Started POST "/pictures" for 127.0.0.1 at 2012-06-20 18:50:51 +0100 Processing by PicturesController#create as JSON Param

使用在Rails中进行多个文件上载之后,只要将属性:multiple=>true添加到file_字段,就会出现问题

<%= f.file_field :path, :multiple => true %>
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'
于2012-06-20 18:50:51+0100开始为127.0.0.1发布“/pictures”
PicturesController处理#创建为JSON
参数:{“utf8”=>“✓", "真实性令牌“=>”hcMORNvY1Rx/tbHv8wB+hLKzS92Nez5qHdgHXfcq+Nc=”,“图片”=>{“路径”=>[#]}
在1ms内完成500个内部服务器错误
回形针::AdapterRegistry::NoHandlerError(找不到[]的处理程序):
app/controllers/pictures\u controller.rb:14:in'create'
有没有人想出解决这个问题的办法


Rails:3.2.5,回形针:3.1.2,浏览器:Chrome版本19.0.1084.56,操作系统:Mac OS X 10.7.4

我也做了同样的事情,但文件字段没有multiple=>true。您将无法使用“文件浏览器”对话框一次选择多个图像,但只要您不使用IE,您仍然可以一次拖放多个文件,而且效果非常好

我还没有在对话框中选择多个文件,但这只是一个小问题,一旦你得到其余的设置工作