php – How can I load multiple files with AJAX jQuery?

I have a code that allows me to upload both a file and multiple files. The problem is, however, that I'm uploading multiple files at the same time and showing the percentage of usage of all files at the same timeHow do I Load layer?

I try to integrate the request using the iteration file files[x] but still they invite me all at once.

HTML

JS / jQuery – AJAX request

                $ (Document) .ready (Function () {
$ (# Test #). submit (function (event) {

if ($ (# file #). val ()) {// The file has a value?
event.preventDefault ();
var files = document.getElementById (& # 39; file & # 39;). files; // Capture files in a variable

for (x = 0; x < files.length; x++) {
                var file_now = document.getElementById('file').files[x];
                var formData = new FormData();
                formData.append("file", file_now);

                $.ajax({                // Petición para enviar archivos
                    url: "test.php",
                    type: "POST",
                    data: formData,     // En caso contrario enviamos un FormData(1)
                    contentType: false,
                    processData: false,
                    cache: false,
                    xhr: function() {
                        var xhr = $.ajaxSettings.xhr();

                        //Upload progress
                        xhr.upload.addEventListener("progress", function(evt){
                            if (evt.lengthComputable) {
                                var percentComplete = Math.round((evt.loaded * 100) / evt.total);
                                //Do something with upload progress
                                console.log(percentComplete);
                            }
                        }, false);
                        return xhr;
                    },
                    success: function (data) { console.log("Nombre => "+ data);}
});
}
}
return false;
});
});

PHP

    ". $ _FILES['file']['size']    , "Bytes");
}
}
miscellaneous
echo "The file is empty";
}

?>