I have this simple snippet in which I wnat to add a selected file from a inputfield in FormData-Object, but whatever I do, a data.toSource() always returns nothing.
Can someone tell me, what I'm doing wrong?
$(document).ready(function() {
$('#basicUploadFile').live('change', function () {        
    data = new FormData();
    for (var i = 0; i < this.files.length; i++)  {
        data.append('userfile', this.files[i].name);
        alert(this.files[i].name);
    }
    alert(data.toSource());       
    });    
});
 
     
    