RAILS 3 + Facebox form submissions loses the image chosen to upload

190 Views Asked by At

I have a registration form that has a file upload field and i use paperclip to handle the upload for me. When i have the form submitted by rails everything is fine. What i tried to do is instead of a form.submit adding a link_to that triggers a facebox call to a hidden div in the form and render the popup with the submit button. I submit the form via a post request with jQuery, but what happens is that i dont see the file upload when the form is submitted via jQuery.

All other params i see through the form.serialize().

Any thoughts?

1

There are 1 best solutions below

0
On BEST ANSWER

What i did is just hide a div and then show the submit button on that div. I made the div look like a popup with css and everything looks fine now the form submits all its fields.