Fix: Add support for TB and PB in formatBytes
This commit is contained in:
parent
40aa663101
commit
e56f783ef9
1 changed files with 1 additions and 1 deletions
|
|
@ -2,7 +2,7 @@ export function formatBytes(bytes: number): string {
|
|||
if (bytes === 0) return "0 Bytes";
|
||||
|
||||
const k = 1024;
|
||||
const sizes = ["Bytes", "KB", "MB", "GB"];
|
||||
const sizes = ["Bytes", "KB", "MB", "GB", "TB", "PB"];
|
||||
|
||||
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue