I need to call a Web Service before the file is delete so I decided to use the \"submitDelete\" callback. What I\'m trying to accomplish is to get the Name of the File and
You can pass whatever parameters you want with the DELETE request. In the submitDelete
callback, for example, you can call the setDeleteFileParams
API method, passing in the filename. There is a getName
API method that will return the name of a file, given the file's ID.
I just noticed that the setDeleteFileParams
API method is not documented. I'll open up a bug report and be sure to properly document that in 3.6. This method works just like the setParams
API method (same parameters). Please note though, that parameters for DELETE requests will be part of the query string.
Inside your onSubmitDelete callback handler, the following code will retrieve the filename and add it as a parameter for the associated DELETE request:
.on('submitDelete', function(event, id) {
var filename = $(this).fineUploader('getName', id);
$(this).fineUploader('setDeleteFileParams', {filename: filename}, id);
});