title: Multiple File Upload using Carrierwave and JQuery File Upload
body: <pre><code>&lt;%= semantic_form_for(@image, :url =&gt; { :action =&gt; "create_friend_upload" }, :html =&gt; {:multipart =&gt; true}) do |f| %&gt;
      &lt;%= f.inputs do %&gt;
       &lt;%= f.input :image, :input_html =&gt; {:multiple =&gt; true}, name: "gallery[image]" %&gt;
       &lt;%= f.hidden_field :friend_upload, :value =&gt; true %&gt;    
       &lt;%= f.hidden_field :user_id %&gt;
       &lt;%= f.hidden_field :friend_uploader, :value =&gt; current_user.name %&gt;
      &lt;% end %&gt;
       &lt;%= f.buttons do %&gt;
       &lt;%= f.commit_button :button_html =&gt; {:class =&gt; "primary"} %&gt;
      &lt;% end %&gt;
      &lt;% end %&gt;
  </code></pre>
  
  <p>The problem I is that it keeps on submitting an array, which Carrierwave can't handle. It keeps saying <code>name=\"gallery[image][]\"</code> instead of just <code>name=\"gallery[image]\"</code>.  (See below).  Because of it, I also keep getting the error message <code>can't convert nil into String</code>.</p>
  
  <pre><code> @headers="Content-Disposition: form-data; name=\"gallery[image][]\"; filename=\"VW 3.jpeg\"\r\nContent-Type: image/jpeg\r\n",
  </code></pre>
  
  <p>Anyone know how to solve this?  Thanks!</p>
  
  <p><strong>update:</strong></p>
  
  <p>I did see Ryan's railscasts video on JQuery as well, his fix for this didn't work for me.</p>
  
  <p>Gallery.rb</p>
  
  <pre><code>class Gallery &lt; ActiveRecord::Base
    attr_accessible :image, :name, :friend_upload, 
    mount_uploader :image, GalleryUploader
  end
  </code></pre>
  
  <p>Gallery controller</p>
  
  <pre><code>def friend_upload
   @image = Gallery.new
  end
  
  def create_friend_upload
   @image = Gallery.create(params[:gallery])
  end
  </code></pre>