function fileSelectFunc(e) {
e.stopPropagation();
e.preventDefault();
var file = e.target.files || e.dataTransfer.files;
var fileSelect = document.getElementById('file-select');
var data = new FormData();
data.append('userpic', fileSelect.files[0], 'chris.jpg');
$.ajax({
url: "/server/ajax_php_file.php", // Url to which the request is send
type: "POST", // Type of request to be send, called as method
data: data, // Data sent to server, a set of key/value pairs (i.e. form fields and values)
contentType: true, // The content type used when sending data to the server.
cache: false, // To unable request pages to be cached
processData:false, // To send DOMDocument or non processed data file it is set to false
success: function(data) // A function to be called if request succeeds
{
if (file[0].type.match('image/*'))
ParseFile(file[0]);
else
e.target.className = '';
}
});
}
И все равно array(0)