for (var x = 0; x < ins; x++) { form_data.append("files[]", document.getElementById('certificates').files[x]); }
var form_data = new FormData(); var ins = document.getElementById('certificates').files.length;