From a9b9cdc01dafd241bc7a567f76bf8530d69471cf Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Mon, 17 Apr 2017 10:16:14 +0200 Subject: [PATCH] Implemented issue #953 - More precise filesize. --- app/assets/javascripts/app/lib/app_post/utils.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/app/lib/app_post/utils.coffee b/app/assets/javascripts/app/lib/app_post/utils.coffee index 7aac88ebb..44e4ff560 100644 --- a/app/assets/javascripts/app/lib/app_post/utils.coffee +++ b/app/assets/javascripts/app/lib/app_post/utils.coffee @@ -635,7 +635,7 @@ class App.Utils # human readable file size @humanFileSize: (size) -> if size > ( 1024 * 1024 ) - size = Math.round( size / ( 1024 * 1024 ) ) + ' MB' + size = (Math.round( size * 10 / ( 1024 * 1024 ) ) / 10 ) + ' MB' else if size > 1024 size = Math.round( size / 1024 ) + ' KB' else