0
This is the form I’m using to send the file
<form id="form_converter" enctype="multipart/form-data">
<input type="file" name="arquivo" />
<input type="submit" value="Enviar" />
</form>
$(document).on("submit", "#form_converter", function(){
var dados = $('#form_converter').serialize();
jQuery.ajax({
type: "POST",
url: "sys/cv_unique_file.php",
data: dados,
success: function(data)
{
console.log(data);
}
});
return false;
});
And in my PHP
if(isset($_FILES)){
print_r($_FILES);
}
And I just get an empty array Array ()
, already check the permission of the folders and ta all 777
Leo, a while ago I did thus, is in C# the back-end part. At the time I needed to include the
FormData
. I think with the example you can adjust your back-end. I hope it helps :)– Marconi
Related: Upload a file with AJAX
– Woss
Grated: Image upload with Jquery
– Woss
Related: upload without refresh with Formdata, jquery
– Woss