dhtmlxVault API

Constructor

var vault = new dhx.Vault('vault', {
    uploader:{ 
        target:"/upload" 
    }
});

Parameters:

  • an HTML container (or the ID of an HTML container)
  • an object with configuration properties (check below)
Objects
Methods
destructor releases occupied resources
paint repaints Vault

Data Collection

add adds info about one file to the list of Vault
filter filters files in the queue by some criteria
find looks for a file by some criterion
findAll finds all files by a criterion
getId looks up the ID of a file by its index in the queue
getIndex gets the index of a file by its ID
getItem returns a file object
load loads a list of files from a file or a server
map iterates through all items of Vault
move moves files in the queue
parse loads a list of files into Vault
reduce processes each member of the array and returns a single output value
remove removes one or several files from the queue
removeAll removes all the files in the queue
serialize serializes Vault data into an array of JSON objects
sort sorts files in the queue
update updates info of a file in the queue

Events Bus

detach detaches a handler from an event (which was attached before by the on() method)
fire triggers an inner event
on attaches a handler to an inner event of Vault

Toolbar

hide hides the toolbar
show shows the toolbar

Uploader

abort cancels upload of a file
linkDropArea links an extra area for dropping files for upload to Vault
unlinkDropArea unlinks an extra drop area from Vault
selectFile opens the dialog for selecting a new file (files) for adding to Vault
send starts a file upload
Events

Data Collection

AfterAdd fires after a file is added to the queue
AfterRemove fires after a file is removed from the queue
BeforeAdd fires before a file is added to the queue
BeforeRemove fires before a file is removed from the queue
Change fires after an operation on a file
Load fires after data are loaded into Vault
RemoveAll fires when all files are removed from the queue

Uploader

BeforeUploadFile fires before the file upload begins
UploadBegin fires when the file upload begins
UploadComplete fires if the file upload is successful
UploadFail fires if the file upload failed
UploadFile fires when all files are uploaded
UploadProgress fires on each percent of files uploading

Progress Bar

Cancel fires after the upload is canceled
Properties
customScroll adds an alternative scroll bar
downloadURL sets the path for a file download
mode sets the mode of rendering the list of files
scaleFactor the multiplier factor of the quality of an HTML canvas image
progressBar a template for rendering a progress bar
toolbar defines whether the toolbar of dhtmlxVault is shown
uploader specifies the configuration of the Uploader object

Uploader

autosend enables/disables automatic sending of an added file
fieldName sets the file field name in the form data that is sent to the server
params adds extra parameters for sending an XMLHttpRequest
singleRequest defines whether files are sent in one request
target the path for upload
updateFromResponse updates file attributes with data from server response
Back to top