How to change the file attribute , to display filesize in KB for custom file picker.
Content
Hi
I am trying to change and display the file size from B to KB.
But value is not getting changed.
PFB the JS code for the same.
self.selectListener = function(event) {
var files = event.detail.files;
self.files1=ko.observableArray([]);
self.files1=files;
if(files[index].size>999)
{
self.files1[index].size=((files[index].size)/1000);
}
self.fileNames.push(self.files1[index]);
But value of self.files1[index].size is not getting divided by 1000 , means not getting changed.
All this is a part of custom component.
Please let me know if any other details are required.
Thanks,
Himanshu Sethi
0