progressBar

specifies the configuration of the progress bar

object progressBar;

Example

var vault = new dhx.Vault("vault", {
    uploader:{
        // obligatory, the path for upload
        target:"/upload"
    },
    progressBar: {
        template: function(percent, extra) {
            return getBasis(extra.current) + "/" + getBasis(extra.total);
        }
    }
});

Related samples

Details

You can specify a template to define the look and feel of the progress bar by setting the template property in the configuration object. The template function takes two parameters:

  • percent - (number) the current percent of files uploading, a number from 0 to 100
  • extra - (object) an object with additional properties. It can have two optional properties:
    • current - (number) the size of currently uploaded files in bytes
    • total - (number) the total size of all files in the list in bytes
See also
Back to top