I have and array files like so:
Array (4)
File {name: "1.jpg", lastModifiedDate: Thu Jun 16 2016 16:12:00 GMT+0200 (CEST), size: 76669, type: "image/jpeg", slice: function}
File {name: "2.jpg", lastModifiedDate: Thu Jun 16 2016 16:12:00 GMT+0200 (CEST), size: 85341, type: "image/jpeg", slice: function}
File {name: "3.jpg", lastModifiedDate: Thu Jun 16 2016 16:12:00 GMT+0200 (CEST), size: 46841, type: "image/jpeg", slice: function}
File {name: "4.jpg", lastModifiedDate: Thu Jun 16 2016 16:12:00 GMT+0200 (CEST), size: 89657, type: "image/jpeg", slice: function}
Can I not just append this array to a FormData Object and then send it to my php script to process?
for example:
data.append("files[]", files_to_upload);
Or do I have to loop through the files array and append each file separately?
$_FILES: php.net/manual/en/reserved.variables.files.php