From 4dcdec0084414e7dde9e630add01ecd2865bd941 Mon Sep 17 00:00:00 2001 From: Romulus Urakagi Tsai Date: Wed, 20 Nov 2019 10:40:09 +0000 Subject: Attachment upload from card done, need to fix download link --- client/components/main/editor.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'client/components/main/editor.js') diff --git a/client/components/main/editor.js b/client/components/main/editor.js index 39c03aa9..bd110868 100755 --- a/client/components/main/editor.js +++ b/client/components/main/editor.js @@ -229,18 +229,14 @@ Template.editor.onRendered(() => { currentCard, fileObj, attachment => { - if ( - attachment && - attachment._id && - attachment.isImage() - ) { + if (attachment && attachment._id && attachment.isImage) { attachment.one('uploaded', function() { const maxTry = 3; const checkItvl = 500; let retry = 0; const checkUrl = function() { // even though uploaded event fired, attachment.url() is still null somehow //TODO - const url = attachment.url(); + const url = attachment.link(); if (url) { insertImage( `${location.protocol}//${location.host}${url}`, -- cgit v1.2.3-1-g7c22