Browse Source

Implemented issue #953 - More precise filesize.

Martin Edenhofer 8 years ago
parent
commit
a9b9cdc01d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/assets/javascripts/app/lib/app_post/utils.coffee

+ 1 - 1
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