ZZZ<form name="person">
  <input name="name" value="John">
  <input name="surname" value="Smith">
  <input type="file" class="form-control" name="fileToUpload" id="fileToUpload"></input>
  <input type="submit" onchange="upload()">
</form>
<script>
function upload() {
  let xhr = new XMLHttpRequest();
  let formData = new FormData(document.forms.person);
  // rastrea el progreso de la subida
  xhr.upload.onprogress = function(event) {
    console.log(`Uploaded ${event.loaded} of ${event.total}`);
  };

  // seguimiento completado: sea satisfactorio o no
  xhr.onloadend = function() {
    if (xhr.status == 200) {
      console.log("Logrado");
    } else {
      console.log("error " + this.status);
    }
  };

  xhr.open("POST", "./incertar-proveedor.php");
  xhr.send(formData);
}
</script>