More S3 code.

Thanks to xet7 !

Related #142
This commit is contained in:
Lauri Ojansivu 2022-12-26 05:45:32 +02:00
parent 028633b00a
commit fb6f618917
5 changed files with 37 additions and 0 deletions

View file

@ -84,6 +84,11 @@ BlazeComponent.extendComponent({
Meteor.call('moveAttachmentToStorage', _attachment._id, "gridfs");
});
},
'click button.js-move-all-attachments-to-s3'(event) {
this.attachments.forEach(_attachment => {
Meteor.call('moveAttachmentToStorage', _attachment._id, "s3");
});
},
}
]
}
@ -103,6 +108,11 @@ BlazeComponent.extendComponent({
Meteor.call('moveAttachmentToStorage', _attachment._id, "gridfs");
});
},
'click button.js-move-all-attachments-of-board-to-s3'(event) {
this.data().attachments.forEach(_attachment => {
Meteor.call('moveAttachmentToStorage', _attachment._id, "s3");
});
},
}
]
},
@ -122,6 +132,9 @@ BlazeComponent.extendComponent({
'click button.js-move-storage-gridfs'(event) {
Meteor.call('moveAttachmentToStorage', this.data()._id, "gridfs");
},
'click button.js-move-storage-s3'(event) {
Meteor.call('moveAttachmentToStorage', this.data()._id, "s3");
},
}
]
},