diff --git a/server/utils/fileUtils.js b/server/utils/fileUtils.js index 5751372f..7988857f 100644 --- a/server/utils/fileUtils.js +++ b/server/utils/fileUtils.js @@ -83,7 +83,7 @@ function bytesPretty(bytes, decimals = 0) { if (bytes === 0) { return '0 Bytes' } - const k = 1024 + const k = 1000 var dm = decimals < 0 ? 0 : decimals const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'] const i = Math.floor(Math.log(bytes) / Math.log(k)) @@ -265,4 +265,4 @@ module.exports.removeFile = (path) => { module.exports.encodeUriPath = (path) => { return filePathToPOSIX(path).replace(/%/g, '%25').replace(/#/g, '%23') -} \ No newline at end of file +}