diff options
Diffstat (limited to 'client/components/cards/attachments.js')
-rw-r--r-- | client/components/cards/attachments.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/client/components/cards/attachments.js b/client/components/cards/attachments.js index bc7d3979..1a4d5bb6 100644 --- a/client/components/cards/attachments.js +++ b/client/components/cards/attachments.js @@ -57,8 +57,13 @@ Template.cardAttachmentsPopup.events({ const card = this; FS.Utility.eachFile(evt, (f) => { const file = new FS.File(f); - file.boardId = card.boardId; - file.cardId = card._id; + if (card.isImportedCard()) { + file.boardId = Cards.findOne(card.importedId).boardId; + file.cardId = card.importedId; + } else { + file.boardId = card.boardId; + file.cardId = card._id; + } file.userId = Meteor.userId(); const attachment = Attachments.insert(file); |