fix: use decimal (1000-based) units in formatBytes to match S3/curl display
This commit is contained in:
@@ -6,7 +6,7 @@ export function formatBytes(bytes: number): string {
|
|||||||
let value = bytes;
|
let value = bytes;
|
||||||
let unitIndex = 0;
|
let unitIndex = 0;
|
||||||
while (value >= 1024 && unitIndex < UNITS.length - 1) {
|
while (value >= 1024 && unitIndex < UNITS.length - 1) {
|
||||||
value /= 1024;
|
value /= 1000;
|
||||||
unitIndex += 1;
|
unitIndex += 1;
|
||||||
}
|
}
|
||||||
const rounded =
|
const rounded =
|
||||||
|
|||||||
Reference in New Issue
Block a user