From 444848876759173ad80203129250d2f0311f30fc Mon Sep 17 00:00:00 2001 From: Romulus Urakagi Tsai Date: Fri, 8 May 2020 09:32:19 +0800 Subject: Done attachments activities operating --- client/components/activities/activities.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'client') diff --git a/client/components/activities/activities.js b/client/components/activities/activities.js index b082273a..9697d28c 100644 --- a/client/components/activities/activities.js +++ b/client/components/activities/activities.js @@ -152,17 +152,18 @@ BlazeComponent.extendComponent({ attachmentLink() { const attachment = this.currentData().attachment(); + const link = attachment.link('original', '/'); // trying to display url before file is stored generates js errors return ( attachment && - attachment.url({ download: true }) && + link && Blaze.toHTML( HTML.A( { - href: attachment.url({ download: true }), + href: link, target: '_blank', }, - attachment.name(), + attachment.get('name'), ), ) ); -- cgit v1.2.3-1-g7c22