I am using blueimp’s Jquery file upload plugin. For adding files, there are a host of different callbacks. For example:
$('#fileupload').bind('fileuploaddone', function (e, data) {/* ... */})
I would like to bind to a callback that tells me if a file has been deleted successfully, but I have searched the documentation and can’t find anything that looks like it does this. Anyone have an idea how I could do this?
Update:
I should say that the above code only returns for UPLOADING a file. No event is returned for deleting a file. This is what I want to try and implement into bluimp’s source code.
Source code for callbacks is here https://github.com/blueimp/jQuery-File-Upload/blob/master/js/jquery.fileupload-ui.js
To summarize the previous comments, the callback function is the function that will handle the data received from the server via the event
fileuploaddone. Thus, you will have such code :But you can shorten it via an anonymous function :
EDIT
For deletion, the callback can be bound with event
fileuploaddestroy(see this page : BlueImp options).