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
Asked
Active
Viewed 230 times
1 Answers
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
-
1I 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