Skip to content

Commit

Permalink
Fix: Add support for TB and PB in formatBytes
Browse files Browse the repository at this point in the history
  • Loading branch information
kielerdotdev authored Jul 25, 2024
1 parent 40aa663 commit e56f783
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/librqbit/webui/src/helper/formatBytes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Expand Down

0 comments on commit e56f783

Please sign in to comment.