-1

In normal form, I can upload an image. When I am doing this via formRemote it won't work. In params map displays only controller and action . In ajax, file upload is not possible. My need is have to do image upload in ajax and form validation.

Please help me somebody.I tried a lot.

MKB
  • 7,587
  • 9
  • 45
  • 71
Visme
  • 983
  • 8
  • 29

2 Answers2

0

As you noticed you cannot use formRemote to upload files, but you can use some JQuery plugin to do that, for example: http://hayageek.com/ajax-file-upload-jquery/.

Tip: depending on your choice, you will need to provide a link. To do that you can use g.createLink().

0

You can use iframe to upload the image without page refresh.

Try this link for working example.

Community
  • 1
  • 1
MKB
  • 7,587
  • 9
  • 45
  • 71