Php Uploading Multiple Files With Ajax
I've managed to upload multiple files using my current php and html form and wanted to fancy it up a bit with some ajax and automatically submitting the form. I've hidden the 'file
Solution 1:
Based on some preliminary research, utilize FormData and set processing and contentType to false.
$.ajax({
// ...data: newFormData($(this)),
processData: false,
contentType: false,
// ...
});
Sources:
- http://portfolio.planetjon.ca/2014/01/26/submit-file-input-via-ajax-jquery-easy-way/
- http://abandon.ie/notebook/simple-file-uploads-using-jquery-ajax
See: http://api.jquery.com/jquery.ajax/
See: https://developer.mozilla.org/en-US/docs/Web/Guide/Using_FormData_Objects
Post a Comment for "Php Uploading Multiple Files With Ajax"