2
I am sending files via AJAX with Jquery, using the FormData(), and then a question arose, why does it work:
$.ajax({
url:"action/receipt.php",
method:"POST",
processData: false,
contentType: false,
data: form,
success:function(data){
}
});
and that’s not?
$.ajax({
url:"action/receipt.php",
method:"POST",
processData: false,
data: form,
success:function(data){
}
});
I mean, the first way the variable $_FILES prints the expected values, in the second, it is empty.
Why not fill in the content-type can lead to $_FILES empty? Would it be because the pattern be in a different sending format than multipart/form-data, or I am traveling?