Reputation: 173
Here the code I'm using:
deleteFile: {
enabled: true,
method: "POST",
forceConfirm: true,
params:{
id: document.getElementById("fine-uploader-gallery")
},
endpoint: '/FineUpload/Delete'
},
callbacks: {
onDelete: function(id) {
this.setDeleteFileParams({filename: this.getName(id)}, id)
}
}
Upvotes: 2
Views: 583
Reputation: 19890
Very close! You should pass new delete file request parameters in an onSubmitDelete
callback handler, instead of onDelete
. So your callbacks option should look this:
callbacks: {
onSubmitDelete: function(id) {
this.setDeleteFileParams({filename: this.getName(id)}, id)
}
}
I have updated the documentation for onDelete
and onSubmitDelete
to steer others with this goal in the correct direction.
Upvotes: 2