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

This commit is contained in:
Martin Filser 2022-04-29 11:56:50 +02:00
parent 3aba91885f
commit 464bc2f87b
2 changed files with 7 additions and 2 deletions

View file

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