summaryrefslogtreecommitdiffstats
path: root/client/components
diff options
context:
space:
mode:
authorGhassen Rjab <rjab.ghassen@gmail.com>2017-08-31 22:14:57 +0100
committerGhassen Rjab <rjab.ghassen@gmail.com>2017-08-31 22:14:57 +0100
commit4ad4c6ea2274919ced917e541120ad50c7512b80 (patch)
tree03fec9c824517099a2a9213e7aee64b36a865960 /client/components
parentad09630d4ef5a759cc975db241c79b6c94c05129 (diff)
downloadwekan-4ad4c6ea2274919ced917e541120ad50c7512b80.tar.gz
wekan-4ad4c6ea2274919ced917e541120ad50c7512b80.tar.bz2
wekan-4ad4c6ea2274919ced917e541120ad50c7512b80.zip
Assign user to attachment before inserting
Diffstat (limited to 'client/components')
-rw-r--r--client/components/cards/attachments.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/client/components/cards/attachments.js b/client/components/cards/attachments.js
index 4e3e0b19..95cb9f55 100644
--- a/client/components/cards/attachments.js
+++ b/client/components/cards/attachments.js
@@ -62,7 +62,7 @@ Template.cardAttachmentsPopup.events({
const file = new FS.File(f);
file.boardId = card.boardId;
file.cardId = card._id;
-
+ file.userId = Meteor.userId();
Attachments.insert(file);
Popup.close();
});
@@ -109,6 +109,7 @@ Template.previewClipboardImagePopup.events({
file.updatedAt(new Date());
file.boardId = card.boardId;
file.cardId = card._id;
+ file.userId = Meteor.userId();
Attachments.insert(file);
pastedResults = null;
$(document.body).pasteImageReader(() => {});