Переглянути джерело

Fix: incorrect attachment link with subfolder in the url

nztqa 8 роки тому
батько
коміт
ef0c729b27

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

@@ -86,7 +86,7 @@ BlazeComponent.extendComponent({
     const attachment = this.currentData().attachment();
     const attachment = this.currentData().attachment();
     // trying to display url before file is stored generates js errors
     // trying to display url before file is stored generates js errors
     return attachment && attachment.url({ download: true }) && Blaze.toHTML(HTML.A({
     return attachment && attachment.url({ download: true }) && Blaze.toHTML(HTML.A({
-      href: FlowRouter.path(attachment.url({ download: true })),
+      href: attachment.url({ download: true }),
       target: '_blank',
       target: '_blank',
     }, attachment.name()));
     }, attachment.name()));
   },
   },

+ 2 - 2
client/components/cards/attachments.jade

@@ -12,7 +12,7 @@ template(name="previewClipboardImagePopup")
   button.primary.js-upload-pasted-image {{_ 'upload'}}
   button.primary.js-upload-pasted-image {{_ 'upload'}}
 
 
 template(name="previewAttachedImagePopup")
 template(name="previewAttachedImagePopup")
-  img.preview-large-image.js-large-image-clicked(src="{{pathFor url}}")
+  img.preview-large-image.js-large-image-clicked(src="{{url}}")
 
 
 template(name="attachmentDeletePopup")
 template(name="attachmentDeletePopup")
   p {{_ "attachment-delete-pop"}}
   p {{_ "attachment-delete-pop"}}
@@ -25,7 +25,7 @@ template(name="attachmentsGalery")
         .attachment-thumbnail
         .attachment-thumbnail
           if isUploaded
           if isUploaded
             if isImage
             if isImage
-              img.attachment-thumbnail-img.js-preview-image(src="{{pathFor url}}")
+              img.attachment-thumbnail-img.js-preview-image(src="{{url}}")
             else
             else
               span.attachment-thumbnail-ext= extension
               span.attachment-thumbnail-ext= extension
           else
           else

+ 1 - 1
client/components/cards/minicard.jade

@@ -1,7 +1,7 @@
 template(name="minicard")
 template(name="minicard")
   .minicard
   .minicard
     if cover
     if cover
-      .minicard-cover(style="background-image: url('{{pathFor cover.url}}');")
+      .minicard-cover(style="background-image: url('{{cover.url}}');")
     if labels
     if labels
       .minicard-labels
       .minicard-labels
         each labels
         each labels