I'm using jQuery plugin with $.ajax() functions. There is some way to upload a file with POST and do some function when is it done? here my code.... what i do wrong?
$.ajax({
url: "../index.php?rqst=upload",
type: 'POST',
data:{
'fileToUpload': $("#fileToUpload").val()
},
success: function(data) {
alert("file upload");
}});
and this is the file input:
<input class="form-control" type="text" name="fileToUpload" id="fileToUpload">
and there is a way to display a gif during the load??? thanks in advance