mirror of
https://github.com/wekan/wekan.git
synced 2025-04-22 04:57:07 -04:00
Added - auto update card cover with latest uploaded image attachment of card
This commit is contained in:
parent
e2f768c6a0
commit
84d60b5908
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