Skip to content

Commit

Permalink
Merge 3116efd into f2ff62b
Browse files Browse the repository at this point in the history
  • Loading branch information
talavis committed Nov 22, 2019
2 parents f2ff62b + 3116efd commit 800c584
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]}"

Expand Down

0 comments on commit 800c584

Please sign in to comment.