diff --git a/client/components/settings/attachments.jade b/client/components/settings/attachments.jade index 0c35fb0e4..11670a1b3 100644 --- a/client/components/settings/attachments.jade +++ b/client/components/settings/attachments.jade @@ -52,7 +52,7 @@ template(name="moveBoardAttachments") th {{_ 'name'}} th {{_ 'path'}} th {{_ 'version-name'}} - th {{_ 'size'}} (B) + th {{_ 'size'}} th GridFsFileId th {{_ 'storage'}} th {{_ 'action'}} @@ -68,7 +68,7 @@ template(name="moveAttachment") td {{ name }} td {{ version.path }} td {{ version.versionName }} - td {{ version.size }} + td {{ fileSize version.size }} td {{ version.meta.gridFsFileId }} td {{ version.storageName }} td diff --git a/client/components/settings/attachments.js b/client/components/settings/attachments.js index c101ffcc7..64949a6be 100644 --- a/client/components/settings/attachments.js +++ b/client/components/settings/attachments.js @@ -1,4 +1,5 @@ import Attachments, { fileStoreStrategyFactory } from '/models/attachments'; +const filesize = require('filesize'); BlazeComponent.extendComponent({ subscription: null, @@ -108,6 +109,10 @@ BlazeComponent.extendComponent({ }).register('moveBoardAttachments'); BlazeComponent.extendComponent({ + fileSize(size) { + const ret = filesize(size); + return ret; + }, events() { return [ {