From 3116efd077319dd14963bb6ed5c183a9243f9df1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Linus=20=C3=96stberg?= Date: Fri, 22 Nov 2019 20:58:26 +0100 Subject: [PATCH] Fix file sizes; K->k, b->B --- backend/application.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/application.py b/backend/application.py index d5ffde0da..4e01e2fc9 100644 --- a/backend/application.py +++ b/backend/application.py @@ -271,7 +271,7 @@ def get(self, dataset, ds_version=None): def format_bytes(nbytes): - postfixes = ['b', 'Kb', 'Mb', 'Gb', 'Tb', 'Pb', 'Eb'] + postfixes = ['B', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB'] exponent = math.floor(math.log(nbytes) / math.log(1000)) return f"{round(nbytes/1000**exponent, 2)} {postfixes[exponent]}"