Working with Vault

You can repaint Vault, if needed, or call the destructor to free up occupied resources. It is also possible to execute operations with dhtmlxVault via the API of the Uploader object. Check the list below to explore the available options.

Repainting Vault

If you need to repaint Vault by some reason, you should call the paint method.


Calling destructor

When it's necessary to release resources occupied by Vault during its activity, you can make use of the destructor method:


The destructor() method performs the following actions:

  • removes toolbar hotkeys
  • unlinks all linked drop areas
  • cancels files uploading

Canceling file upload

Users can cancel upload by clicking the Cancel button. You can also cancel the upload of a specific file by calling the abort method of Uploader:


Adding extra drop area

Vault itself is an area for dropping files for upload. You can add extra areas for the same purpose and use the linkDropArea method to allow dropping files to them:

<div id="drophere">DROP HERE</div>

Related sample:  Vault. Custom drop area

To unlink an extra drop area from Vault, call the unlinkDropArea method of Uploader:


Selecting files for upload

New files for upload can be selected by clicking the "+" button or they can be dragged to dhtmlxVault. You can also do this with the help of the selectFile method of Uploader. It opens the file dialog box for selecting a new file (files).


Starting files upload

Files in the queue are uploaded automatically by default, since the autosend property is enabled, or after a click on the Upload button, if autosend is disabled. You can also upload files with the help of the send method:


Check the Uploading Files article to get information on how to process file upload on the server side.

Back to top