mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 23:40:13 +01:00
Merge branch 'auto-update-card-cover-with-latest-uploaded-image' of https://github.com/thuanpq/wekan into thuanpq-auto-update-card-cover-with-latest-uploaded-image
This commit is contained in:
commit
07954c0f6d
1 changed files with 7 additions and 1 deletions
|
|
@ -60,7 +60,13 @@ Template.cardAttachmentsPopup.events({
|
|||
file.boardId = card.boardId;
|
||||
file.cardId = card._id;
|
||||
file.userId = Meteor.userId();
|
||||
Attachments.insert(file);
|
||||
|
||||
const attachment = Attachments.insert(file);
|
||||
|
||||
if (attachment && attachment._id && attachment.isImage()) {
|
||||
card.setCover(attachment._id);
|
||||
}
|
||||
|
||||
Popup.close();
|
||||
});
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue