17564: Change file size unit base from 1000 to 1024 17564-file-size-inaccuracy
authorStephen Smith <stephen@curii.com>
Tue, 3 Aug 2021 20:29:00 +0000 (16:29 -0400)
committerStephen Smith <stephen@curii.com>
Tue, 3 Aug 2021 20:29:00 +0000 (16:29 -0400)
Arvados-DCO-1.1-Signed-off-by: Stephen Smith <stephen@curii.com>

src/common/formatters.ts

index eeab703d0d4955f915efa782730135e945ffe83c..779809f1569494da93c599706fd1d977201df46a 100644 (file)
@@ -66,19 +66,19 @@ export function formatUploadSpeed(prevLoaded: number, loaded: number, prevTime:
 
 const FILE_SIZES = [
     {
-        base: 1000000000000,
+        base: 1099511627776,
         unit: "TB"
     },
     {
-        base: 1000000000,
+        base: 1073741824,
         unit: "GB"
     },
     {
-        base: 1000000,
+        base: 1048576,
         unit: "MB"
     },
     {
-        base: 1000,
+        base: 1024,
         unit: "KB"
     },
     {