Check documentation for the latest version of dhtmlxSuite readableSize DHTMLX Docs

readableSize

converts the file size into a readable format

string readableSize(number size);
sizenumbersize to convert
stringformatted size

Example

console.dir([
    myVault.redableSize(1),
    myVault.redableSize(1234),
    myVault.redableSize(1234567),
    myVault.redableSize(1234567890),
]);
// output: 1 b, 1.21 Kb, 1.18 Mb, 1.15 Gb

Details

This API page is for Vault v2.5. Please go to docs.dhtmlx.com/vault/ to see API reference for the current version of dhtmlxVault.

Back to top