diff --git a/frontend/js/utils.js b/frontend/js/utils.js index bbb19c0..e31ee86 100644 --- a/frontend/js/utils.js +++ b/frontend/js/utils.js @@ -28,9 +28,9 @@ export const prettySize = (fileSizeInBytes) => { var i = -1; var byteUnits = [" kB", " MB", " GB", " TB", "PB", "EB", "ZB", "YB"]; do { - fileSizeInBytes = fileSizeInBytes / 1024; + fileSizeInBytes = fileSizeInBytes / 1000; i++; - } while (fileSizeInBytes > 1024); + } while (fileSizeInBytes > 1000); return Math.max(fileSizeInBytes, 0.1).toFixed(1) + byteUnits[i]; };