Browse Source

Attachment size, changed calculation to npm filesize (Card Details)

Martin Filser 3 years ago
parent
commit
110a83a736

+ 1 - 1
client/components/cards/attachments.jade

@@ -54,7 +54,7 @@ template(name="attachmentsGalery")
               span.attachment-thumbnail-ext= extension
         p.attachment-details
           = name
-          span.file-size ({{fileSize size}} KB)
+          span.file-size ({{fileSize size}})
           span.attachment-details-actions
             a.js-download(href="{{link}}?download=true", download="{{name}}")
               i.fa.fa-download

+ 2 - 1
client/components/cards/attachments.js

@@ -16,7 +16,8 @@ Template.attachmentsGalery.helpers({
     return Meteor.user().isBoardAdmin();
   },
   fileSize(size) {
-    return Math.round(size / 1024);
+    const ret = filesize(size);
+    return ret;
   },
 });