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.
If you need to repaint Vault by some reason, you should call the paint method.
vault.paint();
When it's necessary to release resources occupied by Vault during its activity, you can make use of the destructor method:
vault.destructor();
The destructor() method performs the following actions:
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:
vault.uploader.abort("file_id");
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>
vault.uploader.linkDropArea("drophere");
Related sample: Vault. Custom drop area
To unlink an extra drop area from Vault, call the unlinkDropArea method of Uploader:
vault.uploader.unlinkDropArea("drophere");
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).
vault.uploader.selectFile();
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:
vault.uploader.send();
Check the Uploading Files article to get information on how to process file upload on the server side.
Back to top