I am using jQuery fileupload plugin and I want to do some custom jQuery stuff once fileupload is done
from here https://github.com/blueimp/jQuery-File-Upload/wiki/Options
Now it says this
Callback for successful upload requests.
$('#fileupload')
.bind('fileuploaddone', function (e, data) {/* ... */})
Now I have defined this custom function for testing in my own js file
$('#fileupload').bind('fileuploaddone', function (e, data) {/* ... */
alert('Hello');
})
But it’s not working.
But if I edit the main file in here
// Callback for successful uploads:
done: function (e, data) {
Then it works.
Looking at the library code, seems all events are renamed removing ‘fileupload’ … so ‘fileuploaddone’ becomes just ‘done’. It is valid for all other callbacks.
look at this section:
If you have some doubts about what’s happening, just look at the code inside. This library is not compressed so it is easy to see. for example
startcallback is implemented.fileuploadstartis not.