Hello Team
We are using the Vue File Manager from SyncFusion. We are trying to format the file size such that it fits the criteria of KB, MB, GB etc.
We have exposed and attempted to use :detailsViewSettings but we are not able to use the template field to compute our own file size formatting i.e
formatBytes: function (bytes, decimals = 2) {
console.log("it foes here + " + bytes);
if (bytes === 0) return '0 Bytes';
const k = 1024;
const dm = decimals < 0 ? 0 : decimals;
const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
const i = Math.floor(Math.log(bytes) / Math.log(k));
return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i];
},
Is there any suggestions you can provide in order to resolve this.
Thank you