I have following html
<form id="submit-form">
  <input type="file" id="resume" name="resume[]" class="inputFileHidden" multiple>
  <input type="submit">
</form>
I am uploading files using ajax using formdata. The thing is that I don't want to send all files in one go using ajax. Instead I want to send single file per ajax request.
To upload files I am using following jQuery code
$('#submit-form').submit(function(e) {
  e.preventDefault();
  var formData = new FormData(this);
  var url = "upload-files.php";
  $.ajax({
    url: url,
    type: 'post',
    data: formData,
    success: function(response) {
      alert(response);
    },
    cache: false,
    contentType: false,
    processData: false
  })
})
 
     
    