title: Rails Accessing an Uploaded File and Saving it to PaperClip
body: <p>I'm using the following file uploader with Rails 3: <a href="https://github.com/blueimp/jQuery-File-Upload" rel="noreferrer">https://github.com/blueimp/jQuery-File-Upload</a> </p>
  
  <p>The uploader on the client side is working fine. I can see in the Rails log file that the following is being posted when I upload a file:</p>
  
  <pre><code>Started POST "/attachments/upload" for 127.0.0.1 at Mon Jan 24 14:15:25 -0800 2011
    Processing by AttachmentsController#upload as */*
    Parameters: {"_http_accept"=&gt;"application/javascript", "authenticity_token"=&gt;"F1h9pvCZL9HUgTjwCIAMc%252BW1cYwx7eBOPwThHfbS5ZU%253D", "file"=&gt;#&lt;ActionDispatch::Http::UploadedFile:0x1076a6d48 @content_type="image/jpeg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"joecocker.jpg\"\r\nContent-Type: image/jpeg\r\n", @original_filename="joecocker.jpg", @tempfile=#&lt;File:/var/folders/lF/lF0Ne5vGFj44kV54W3zBdU+++TI/-Tmp-/RackMultipart20110124-12264-rbtnth-0&gt;&gt;}
  </code></pre>
  
  <p>The issue I'm having is I'm unable to save the uploaded file to Paperclip.</p>
  
  <p>I've ried:</p>
  
  <pre><code>@attachment = Attachment.create(:attachment =&gt; File.open(params[:file].tempfile.path))
  @attachment = Attachment.create(:attachment =&gt; params[:file].tempfile.path)
  </code></pre>
  
  <p>And neither work. Paperclip inserts a file attachment name of "RackMultipart20110124-12264-rbtnth-0"</p>
  
  <p>Any ideas / suggestions on how to save the file to paperclip? thanks</p>