From 59a936ae90f8122f928e10b13706a3369479a00e Mon Sep 17 00:00:00 2001 From: David Arnold Date: Wed, 16 Sep 2020 21:19:32 -0500 Subject: [PATCH] fix: activity download link --- client/components/activities/activities.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/components/activities/activities.js b/client/components/activities/activities.js index cc5237097..87ac4a9a2 100644 --- a/client/components/activities/activities.js +++ b/client/components/activities/activities.js @@ -196,14 +196,14 @@ BlazeComponent.extendComponent({ // trying to display url before file is stored generates js errors return ( (attachment && - attachment.url({ download: true }) && + attachment.path && Blaze.toHTML( HTML.A( { - href: attachment.url({ download: true }), + href: `${attachment.link()}?download=true`, target: '_blank', }, - DOMPurify.sanitize(attachment.name()), + DOMPurify.sanitize(attachment.name), ), )) || DOMPurify.sanitize(this.currentData().activity.attachmentName)