Browse Source

fix: activity download link

David Arnold 4 years ago
parent
commit
0d97b1314d
1 changed files with 3 additions and 3 deletions
  1. 3 3
      client/components/activities/activities.js

+ 3 - 3
client/components/activities/activities.js

@@ -197,14 +197,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)