瀏覽代碼

fix: activity download link

David Arnold 4 年之前
父節點
當前提交
59a936ae90
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      client/components/activities/activities.js

+ 3 - 3
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)