Added - auto update card cover with latest uploaded image attachment of card

reviewable/pr1387/r1
Thuan Pham Quoc 8 years ago
parent e2f768c6a0
commit 84d60b5908
  1. 8
      client/components/cards/attachments.js

@ -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…
Cancel
Save