so i have this problem, i can not possibly read/save files by AJAX/JQuery i`m sending using this
<form class='file'>
 <input type='file' class='file_upload' name='def' required/>
 <input type='submit' value="Wyślij">
</form>This is my try on the sending JQuery stuff:
$(document).ready(function(){
 $("form.file").unbind().on("submit",function(event){
  $(this).find('input[type=submit]').attr('disabled', 'disabled');
  event.preventDefault();
  $(this).find(".file_upload").each(function(){
   sendFile(this.files[0]);
  });
  
  $(this).parent().remove();
 });
});
function sendFile(file){
 $.ajax({
  type: 'post',
  url:'sayv.php?name='+file.name,
  data:file,
  processData: false,
     contentType: file.type,
  success: function(data){
   console.log(data);
  }
   });
}And, i can`t possibly read it anyway by the PHP, $_FILES is empty, $_POST too...
 
    