html markup:
<input id="fileSelect" type="file" id="file" name="files[]" multiple="multiple" accept="image/*" />
I am uploading multiples files with php. I want to make an array of upload files and send to server with ajax. how to make an array of the multiple selected files?
JavaScript:
jQuery.ajax({
url: 'insertfiles.php',
type: "POST",
data: {
file: // array of selected files.
},
success: function(data){
},
error: function(data){
alert( 'Sorry.' );
}
});