fix: use decimal (1000-based) units in formatBytes to match S3/curl display

This commit is contained in:
TerryM
2026-06-01 15:24:41 +08:00
parent fa78568c94
commit c32ae539f6

View File

@@ -6,7 +6,7 @@ export function formatBytes(bytes: number): string {
let value = bytes;
let unitIndex = 0;
while (value >= 1024 && unitIndex < UNITS.length - 1) {
value /= 1024;
value /= 1000;
unitIndex += 1;
}
const rounded =