Ruby on Rails
Thursday, March 28, 2013
I have problems with multiple file upload. I tried Paperclip with jQuery file uplad plugin and get the error mentioned in the title. Files get uploaded without problems, but I keep getting this embarrassing error.
Can somebody offer a solution to my problem or suggest alternative solution that can be implemented in 2 hours? My client is getting a bit uneasy now.
I have tried everything I could think of and in the end I have modified the model following this advice:
https://github.com/blueimp/jQuery-File-Upload/issues/365#issuecomment-13859210
My code can be found at:
https://github.com/bigos/chrisb-images/blob/master/app/models/upload.rb
relevant bit in my model looks like this:
def to_jq_upload{:files => [{:name => upload_file_name,:type => upload_content_type,:size => upload_file_size,:url => upload.url,:delete_url => upload_path(self),:delete_type => "DELETE"}]}end
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/KLKo4NfV5rIJ.
For more options, visit https://groups.google.com/groups/opt_out.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment