multiple file selection raise Server internal error in rails with carrierwave gem and jQuery-File-Upload library
===

I'm work on a rails project that has an uploader as one of it's componants.

I'm using carrierwave and  [jQuery-File-Upload][1] library to get some ajax !

when I added one more feature, that is multi choice 

> <%= f.file_field :path, multiple: "multiple" %>

the app stop uploading and raising `server internal error`

when I use firebug console
the error was in that line

>  xhr.send( ( s.hasContent && s.data ) || null );

without that `multiple` attribute, it works very well!
like this
> <%= f.file_field :path %>

I can't imagine where this that error!

that's my model:

> class Picture < ActiveRecord::Base   include
> Rails.application.routes.url_helpers   attr_accessible :avatar,
> :avatar_name, :avatar_uid, :name, :string, :path   mount_uploader
> :avatar, AvatarUploader
> 
>   def to_jq_upload
>     {
>       "name" => read_attribute(:avatar),
>       "size" => avatar.size,
>       "url" => avatar.url,
>       #"thumbnail_url" => avatar.thumb.url,
>       "delete_url" => picture_path(:id => id),
>       "delete_type" => "DELETE" 
>     }   end end

my `create controller`

>       def create
>         @picture = Picture.new
>         @picture.avatar = params[:picture][:path]
>         if @picture.save
>           respond_to do |format|
>             format.html {  
>               render :json => [@picture.to_jq_upload].to_json, 
>               :content_type => 'text/html',
>               :layout => false
>             }
>             format.json {  
>               render :json => [@picture.to_jq_upload].to_json     
>             }
>           end
>         else 
>           render :json => [{:error => "custom_failure"}], :status => 304
>         end
>       end

and I just use the views in that example in [here][2]


  [1]: https://github.com/blueimp/jQuery-File-Upload/
  [2]: https://github.com/blueimp/jQuery-File-Upload/wiki/Rails-setup-for-V6