Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,359,850
Community Members
 
Community Events
168
Community Groups

XRay document generator - create hyperlinks to attachments

I have created a template that iterates over all issues and exports some relevant data in a document. I want it to show attachments as well. For I figured out how to display images but for other data types it obviously wouldn't work so I'd like to know if there is a way to get a hyperlink to an attachment? 

This way if the attachment is not an image you could just use the hyperlink to get to the file. 

1 answer

I have found a solution myself.

For anyone interested:

#{for attachments}
@{title=${Attachments[n].Name}|href=${BaseURL}/rest/api/2/attachment/content/${Attachments[n].ID}}
#{end}

 Will result in a hyperlinks that have the attachments name as a title and will lead to the download page where the download will start automatically. 

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Apps & Integrations

Apps for Confluence you won't want to miss: RSVP for September's Appy Hours

Calling all collaborators and Confluence users! Our Appy Hours event on September 29th features 4 presenters demoing functionality to superpower Confluence. Don't miss learning about these apps i...

112 views 0 9
Read article

Atlassian Community Events