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?
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}")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Still have a question?
Get fast answers from people who know.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.