0

I want to submit form using ajax.but the problem is that ,i found ajax doesn't support file upload while we submit form.Is there any other way we can do it using ajax because i don't want to refresh page using normal form submit.Please help any suggestion will be very helpful for me. thanks in advance

kiransh
  • 369
  • 2
  • 4
  • 15

1 Answers1

1

You can do this in several ways:

First: Use canvas How to save a HTML5 Canvas as Image on a server

Second: Use some js library like: http://blueimp.github.io/jQuery-File-Upload/ or https://github.com/LPology/Simple-Ajax-Uploader

Third: Use html5 FormData How to upload a file using jQuery.ajax and FormData

Community
  • 1
  • 1
Den Kison
  • 1,074
  • 2
  • 13
  • 28
  • 1
    I recently found LPology's Simple Ajax Uploader, works like a dream! Perfectly Uploads asyncronously on all used browsers – Pierre Jun 28 '14 at 16:12