Attachment size, changed calculation to npm filesize (Attachment Move)

pull/4641/head
Martin Filser 3 years ago
parent 3aba91885f
commit 464bc2f87b
  1. 4
      client/components/settings/attachments.jade
  2. 5
      client/components/settings/attachments.js

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

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

Loading…
Cancel
Save