I'm using Jquery file upload by blueimp want to catch an action that happens after upload of file. So, this works fine
.on('change','input[type=file]',function(e)
{
console.log('OOOOOOOOk');
})
But it's not working for me, because I need action after file upload completed. So, in docs I've found this solution:
var url = './fileUpload/jQuery-File-Upload/server/php/';
$('#fileupload').fileupload({
url: url,
dataType: 'json',
done: function (e, data) {
$.each(data.result.files, function (index, file) {
$('<p/>').text(file.name).appendTo('#files');
});
},
progressall: function (e, data) {
var progress = parseInt(data.loaded / data.total * 100, 10);
$('#progress .progress-bar').css(
'width',
progress + '%'
);
}
}).prop('disabled', !$.support.fileInput)
.parent().addClass($.support.fileInput ? undefined : 'disabled')
.bind('fileuploadcompleted',function(e,data)
{
console.log('eventFinished');
});
But I dont see eventFinished string in console after uploading, but see OOOOOOOk. How can I catch this event then?