How to transfer a file from input type = file using ajax or post using the POST file to a php file I can’t find and do anything sensible.
I'm trying this way, but something comes out of nothing good.
$.ajax({ url: "ajax.php", type: "post", data: "upload_file="+$('#file')[0].files[0], success: function(){ }, error: function (jqXHR, exception) { } dataType: "json" }); I try to catch php like that
$_FILES['upload_file']['tmp_name']