RED-6537: Fixed download size conversion.
This commit is contained in:
parent
1fb671e8c2
commit
634a1aa8de
@ -45,7 +45,7 @@ export class DownloadStatus implements IDownloadStatus, IListable {
|
||||
}
|
||||
|
||||
private get _size() {
|
||||
const i = this.fileSize === 0 ? 0 : Math.floor(Math.log(this.fileSize) / Math.log(1024));
|
||||
return (this.fileSize / Math.pow(1024, i)).toFixed(2) + ' ' + ['B', 'kB', 'MB', 'GB', 'TB'][i];
|
||||
const i = this.fileSize === 0 ? 0 : Math.floor(Math.log(this.fileSize) / Math.log(1000));
|
||||
return (this.fileSize / Math.pow(1000, i)).toFixed(2) + ' ' + ['B', 'kB', 'MB', 'GB', 'TB'][i];
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user