Check documentation for the latest version of dhtmlxSuite onBeforeFileRemove DHTMLX Docs


fires before the user removes a single file from the list of files

void onBeforeFileRemove(object file);
fileobjectan object with file details


myVault.attachEvent("onBeforeFileRemove", function(file){     
    // file is an object with details
        id:         123,             // int, internal file ID
        name:       "filename.ext",  // string, filename detected by browser
        serverName: "filename2.ext", // string, filename returned by server
        size:       132500,          // int, file size in bytes
        uploaded:   true,            // boolean, true/false
        error:      false            // boolean, error while uploading, if any
    // your code here, for example
    if (!confirm("Are you sure you want to delete ""?")) {
        return false;
    return true;


This API page is for Vault v2.5. Please go to to see API reference for the current version of dhtmlxVault.

  • cancelable, return false to cancel the 'remove' operation
  • size in html4 mode is available only after the file has been uploaded
  • serverName is available only after the file has been uploaded
See also
Change log

added in version 2.0

Back to top