destroy: function (e, data) {
var that = $(this).data('blueimp-fileupload') ||
$(this).data('fileupload');
if (data.url) {
$.ajax(data);
that._adjustMaxNumberOfFiles(1);
}
that._transition(data.context).done(
function () {
$(this).remove();
that._trigger('destroyed', e, data);
}
);
}
},
var myDestroyHandler = function(e, data) {
//override stuff goes here...
//don't forget to do the same housekeeping that the old handler did, since you are replacing it.
};
$('#fileupload').fileupload({
url: '/foo/bar/upload.jsp',
destroy: myDestroyHandler
});
//invocation context for old handler
var thisobj = $('#fileupload')[0];
var oldDestroy = $('#fileupload').fileupload('option', 'destroy');
var newDestroy = function(e, data) {
console.log(" greetings from the new destroy handler!");
//more awesome code goes here...
//if the delete worked on the server's end...
//copy data, but with blank url (don't wipe out data.url or it's gone for good)
var _data = $.extend({}, data, {url:null});
oldDestroy.call(thisobj, e, _data);
};
//replace the old handler with our handler (which may, in fact, call the old handler)
$('#fileupload').fileupload('option', 'destroy', newDestroy);
--
You received this message because you are subscribed to a topic in the Google Groups "jQuery-File-Upload" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jquery-fileupload/9SpfNYCmgcE/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to jquery-fileupl...@googlegroups.com.
To post to this group, send email to jquery-f...@googlegroups.com.
Visit this group at http://groups.google.com/group/jquery-fileupload?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.