I\'m using the very good jquery plugin blueimp / jQuery-File-Upload
$(\'#fileupload\').fileupload({
autoUpload: true
, filesContainer: \'#attachments_prese
Well this is quite an old post, but this is something which worked very well for me so I thought to post it.
Bind the event to FileUploader (I did it in main.js):
$('#fileupload').bind('fileuploaddone', function (e, data) {
FileUploadDone(e, data);
});
In your html file, use the following code to get the file name:
function FileUploadDone(e, data) {
for (x in data._response.result.files){
if (data._response.result.files[x].error == "")
alert(data._response.result.files[x].name);
else
alert(data._response.result.files[x].error);
}}
You should watch the data object in firebug. This object encapsulates most of the information.