tors / jquery-fileupload-rails-paperclip-example

An example rails application that uses the jquery-fileupload-rails and paperclip gems to upload files.
153 stars 141 forks source link

File Upload Not Working Status 422 (Unprocessable entity) (Not my validations) #12

Open spq24 opened 11 years ago

spq24 commented 11 years ago

I'm trying to use the gem with paperclip. Everything seems to be working fine except that I'm getting Error OK as the status after I try to upload it. Below is what the JS console says when I try to upload it. Also a link to a gist I made with the model, controller, and form partial.

I'm trying to upload a 12.57 KB png image so it should not be my validations tripping it up.

Please help! I've posted this on stack overflow and the support forum and haven't been able to fix it on my own.

https://gist.github.com/spq24/5000772

POST http://localhost:3000/pins 422 (OK) jquery.js:8476 send jquery.js:8476 jQuery.extend.ajax jquery.js:7931 send jquery.fileupload.js:659 $.widget._onSend jquery.fileupload.js:720 (anonymous function) jquery.ui.widget.js:100 newData.submit jquery.fileupload.js:759 $.widget._startHandler jquery.fileupload-ui.js:517 (anonymous function) jquery.ui.widget.js:100 handlerProxy jquery.ui.widget.js:398 jQuery.event.dispatch jquery.js:3046 elemData.handle jquery.js:2722