How to Install dhtmlxVault

You can choose between several variants of installing Vault package into your project. It is possible to make use of the npm package manager, include Vault JS/CSS files from CDN or download the component package and include source files on a page by setting paths to them.

The source files are represented in two versions: the full version and the minified one.

Install via npm

To install GPL version of dhtmlxVault via npm, run the following command line:

npm install dhx-vault

Later in the code you can use:

import {Vault} from "dhx-vault";
import "dhx-vault/codebase/vault.css";
 
const widget = new Vault(node, config);

Include sources from CDN

You can include JS/CSS files of the GPL version of dhtmlxVault from CDN by setting direct links to vault.js and vault.css files:

// full version
<link rel="stylesheet" href="https://cdn.dhtmlx.com/vault/edge/vault.css" 
    type="text/css"> 
<script src="https://cdn.dhtmlx.com/vault/edge/vault.js"></script>
 
// minified version
<link rel="stylesheet" href="https://cdn.dhtmlx.com/vault/edge/vault.min.css" 
    type="text/css"> 
<script src="https://cdn.dhtmlx.com/vault/edge/vault.min.js"></script>

To get the particular version, use the number of the version instead of edge in the link:

// full version
<link rel="stylesheet" href="https://cdn.dhtmlx.com/vault/3.0/vault.css" 
    type="text/css"> 
<script src="https://cdn.dhtmlx.com/vault/3.0/vault.js"></script>
 
// minified version
<link rel="stylesheet" href="https://cdn.dhtmlx.com/vault/3.0/vault.min.css" 
    type="text/css"> 
<script src="https://cdn.dhtmlx.com/vault/3.0/vault.min.js"></script>

Download the package

GPL version

Download the package of dhtmlxVault GPL version.

PRO version

If you have the Commercial or Enterprise license, you need to go to the Client Area and download the PRO package from there.

Independent of the version, unpack the downloaded package into a folder of your project. Then include vault.js and vault.css files into a page. Make sure that you set correct relative paths to these files:

// full version
<script type="text/javascript" src="codebase/vault.js"></script>  
<link rel="stylesheet" href="codebase/vault.css">
 
// minified version
<script type="text/javascript" src="codebase/vault.min.js"></script>  
<link rel="stylesheet" href="codebase/vault.min.css">

How to run samples

Since the main purpose of Vault is file uploading, it's obvious that this component needs a backend to work with files. To provide the possibility to run samples in the docs, the Vault package is equipped with a testing Node.js server which is properly configured and ready to use.

All you need to do is to run two commands from the root directory of the folder with Vault package in the console:

npm install
npm start

After that Vault samples will be launched automatically in a new tab of the browser.

Back to top