mirror of
https://github.com/wekan/wekan.git
synced 2025-04-20 12:07:11 -04:00
Update - auto update card cover with new image uploaded via drag&drop
This commit is contained in:
parent
4fad48e7ac
commit
c3e67510c8
1 changed files with 6 additions and 1 deletions
|
@ -113,7 +113,12 @@ Template.previewClipboardImagePopup.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);
|
||||
}
|
||||
|
||||
pastedResults = null;
|
||||
$(document.body).pasteImageReader(() => {});
|
||||
Popup.close();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue