DHTMLX Docs & Samples Explorer

onBeforeFileRemove

Occurs before the user removes a single file from the list of files to upload (when clicks on button ).

Parameters:

  • realName - (string) the real name of the file (as it's displayed in the control)
  • serverName - (string) the file name that the server returns after uploading or null if the file wasn't uploaded to the server
myForm.attachEvent("onBeforeFileRemove", function(realName, serverName){
    if (!confirm("Are you sure you want to delete "+realName+"?")) return false;
    return true;
})
  • Returning false will cancel the 'remove' operation.