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

This commit is contained in:
Martin Filser 2022-04-29 11:47:46 +02:00
parent af120f2e0b
commit 110a83a736
2 changed files with 3 additions and 2 deletions

View file

@ -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

View file

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