XRay document generator - create hyperlinks to attachments

Maximilian Georgiev September 2, 2022

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

0 votes
Maximilian Georgiev September 6, 2022

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
AUG Leaders

Atlassian Community Events