Skip to content

Commit

Permalink
Correct bytes unit
Browse files Browse the repository at this point in the history
  • Loading branch information
cyriltovena committed Jan 23, 2025
1 parent bd6fefd commit 8669c7b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pkg/dataobj/explorer/dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>DataObj Explorer</title>
<script type="module" crossorigin src="/dataobj/explorer/assets/index-DFUF28zy.js"></script>
<script type="module" crossorigin src="/dataobj/explorer/assets/index-CRVeM2vt.js"></script>
<link rel="stylesheet" crossorigin href="/dataobj/explorer/assets/style-Dz5w-Rts.css">
</head>

Expand Down
2 changes: 1 addition & 1 deletion pkg/dataobj/explorer/ui/src/utils/format.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 B";

const k = 1024;
const sizes = ["B", "KB", "MB", "GB", "TB"];
const sizes = ["B", "KiB", "MiB", "GiB", "TiB"];
const i = Math.floor(Math.log(bytes) / Math.log(k));

return `${(bytes / Math.pow(k, i)).toFixed(2)} ${sizes[i]}`;
Expand Down

0 comments on commit 8669c7b

Please sign in to comment.