Move Attachment to other storages now possible

This commit is contained in:
Martin Filser 2022-03-25 14:08:37 +01:00
parent 536fb00d61
commit 44fd652b05
9 changed files with 383 additions and 99 deletions

View file

@ -72,3 +72,16 @@ template(name="attachmentActionsPopup")
a.js-confirm-delete
i.fa.fa-close
| {{_ 'delete'}}
p.attachment-storage
| {{versions.original.storage}}
if $neq versions.original.storage "fs"
a.js-move-storage-fs
i.fa.fa-arrow-right
| {{_ 'attachment-move-storage-fs'}}
if $neq versions.original.storage "gridfs"
if versions.original.storage
a.js-move-storage-gridfs
i.fa.fa-arrow-right
| {{_ 'attachment-move-storage-gridfs'}}

View file

@ -138,6 +138,14 @@ BlazeComponent.extendComponent({
Cards.findOne(this.data().meta.cardId).unsetCover();
Popup.back();
},
'click .js-move-storage-fs'() {
Meteor.call('moveToStorage', this.data()._id, "fs");
Popup.back();
},
'click .js-move-storage-gridfs'() {
Meteor.call('moveToStorage', this.data()._id, "gridfs");
Popup.back();
},
}
]
}