Import attachments

This commit is contained in:
Xavier Priour 2015-11-16 21:41:49 +01:00
parent 475bc70621
commit ad27a59e57
3 changed files with 121 additions and 63 deletions

View file

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