mirror of
https://github.com/wekan/wekan.git
synced 2026-01-03 16:18:49 +01:00
Done attachments activities operating
This commit is contained in:
parent
7dc0bbd7b2
commit
4448488767
3 changed files with 74 additions and 188 deletions
|
|
@ -152,17 +152,18 @@ BlazeComponent.extendComponent({
|
|||
|
||||
attachmentLink() {
|
||||
const attachment = this.currentData().attachment();
|
||||
const link = attachment.link('original', '/');
|
||||
// trying to display url before file is stored generates js errors
|
||||
return (
|
||||
attachment &&
|
||||
attachment.url({ download: true }) &&
|
||||
link &&
|
||||
Blaze.toHTML(
|
||||
HTML.A(
|
||||
{
|
||||
href: attachment.url({ download: true }),
|
||||
href: link,
|
||||
target: '_blank',
|
||||
},
|
||||
attachment.name(),
|
||||
attachment.get('name'),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue