How to get path to attachments in custom macro?

Bob Nicholson August 25, 2012

I'm creating a custom macro... is there a way to get the path to the attachments on the current page when the macro is invoked?

1 answer

1 accepted

1 vote
Answer accepted
David at David Simpson Apps
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
August 25, 2012

Try converting the velocity from the user macro in this blogpost into pure Java:
A simpler way to view attachments in Confluence

This is the key line to look at:

${req.contextPath}${attachment.downloadPathWithoutVersion}")

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events