I am using the following file downloader with Rails 3: https://github.com/blueimp/jQuery-File-Upload
The user on the client side is working fine. In the Rails log file, I see that the following happens when the file is uploaded:
Started POST "/attachments/upload" for 127.0.0.1 at Mon Jan 24 14:15:25 -0800 2011
Processing by AttachmentsController
Parameters: {"_http_accept"=>"application/javascript", "authenticity_token"=>"F1h9pvCZL9HUgTjwCIAMc%252BW1cYwx7eBOPwThHfbS5ZU%253D", "file"=>
I have a problem: I cannot save the downloaded file in Paperclip.
I drew:
@attachment = Attachment.create(:attachment => File.open(params[:file].tempfile.path))
@attachment = Attachment.create(:attachment => params[:file].tempfile.path)
And nobody is working. Paperclip inserts the name of the attached file "RackMultipart20110124-12264-rbtnth-0"
Any ideas / suggestions on how to save the file in paperclip? thank
source
share