mirror of
https://github.com/wekan/wekan.git
synced 2026-02-03 15:11:48 +01:00
Attachment size, changed calculation to npm filesize (Attachment Move)
This commit is contained in:
parent
3aba91885f
commit
464bc2f87b
2 changed files with 7 additions and 2 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue