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
Community Members
Community Events
Community Groups

Link to a specific attachment version


Confluence saves the page with a reference to an attachment, but no version:

	<ri:attachment ri:filename="Attachment.pdf">
		<ri:page ri:content-title="Other Page"/>

So this would always point to the most current version of the attachment.

I would like to point to a specific version (e.g. v2, even though there is a v5). Is there a solution for this?

Thank you in advance.

2 answers

1 vote

Hello there!

First thing I would like to address is that in Confluence, we have two types of links:

  • Soft Links
  • Hard Links

Soft links are the links we insert using Confluence way of linking, the linking tool. Those links are automatically updated on Base URL change. This type of link works only for internal stuff.

Hard Links are links we refer using the URL address itself. Those links are what we are used to have all over the internet. We need to manually update them if something happen to the original address.

As you have noted Alex, the soft links do not refer to a specific version. They look straight into the latest.

To refer to a specific attachment version straight into a link, we could proceed like this:

  1. Go to the page in which the attachment is present
  2. Preview the attachment
  3. Open the download link in another tab
    1. It should look like this:
      1. http://youraddress:8090/download/attachments/983041/MyAttachment.png?version=3&modificationDate=1553524676608&api=v2&download=true
  4. Copy that link
  5. Change the version= parameter to the desired version
  6. Link that to your desired page


  • This is a hard link, deleting the attachment version will cause a 404
  • You will need to update the link manually if needed
  • You can change download=true to preview=true so the download is not immediately triggered when a user clicks the link

Now, we can achieve something more polished if we use the Attachments Macro. However, this will show all attachment versions. What we need to check is that Include old attachment versions is checked before publishing the page.

Now, can I ask you something else? What is the objective of this link to an older version of an attachment in Confluence?

Maybe we can help you to create a more clean way of doing what you need to achieve!

Looking forward to your reply Alex!


Edit: if you need to look a little deeper into the Storage Format, you can take a look here:

Confluence Storage Format

Hi Diego,

Thank you for your detailed answer.

It's good to hear that there is a solution. Unfortunately, I don't think we can use this solution on a day to day basis for our users.

Background information

We work in a regulated environment where we follow FDA 21 CFR Part 11. According to the regulatory text, electronic records (in our case this would be an Confluence page) shall not be changed once they have been approved.

Now if we take as an example a page called "User Requirements Specification" v11 which includes a picture v1 and approve it with an Atlassian third-party add-on, this would make the page approved. If we then update the page "User Requirements Specification" to v12 and include picture v2, in the page history the page v11 would also point to picture v2. This would violate the integrity of the electronic record.

In the end the requirement would be that each page version points to specific attachment version. The only workaround at the moment is to change the filename each time, so there's only one version of each attachment.

Or is there another solution to this?

Did you find a solution to this?  It seems like a fairly fundamental issue even outside of medical regulatory requirements - because if you have a page with some images the page history no longer allows you to see what the page looked like at some previous point in time. 

We decided to restrict the upload of the same filename by a written procedure. The next step would be to disable or automatically rename uploads of files using an already uploaded filename with a custom add-on.

Not a really an ideal solution, but better than compromising data integrity.

Hi Alex,

what kind of app / plugin do you use to approve the confluence pages? There are some solutions which always shows the correct attachment version for the approved page version. If attachment version will be changed, then approved status will be changed automatically, too. Or you can design your approval workflow that in the final status adding attachments will not be possible...

e.g. Comala Document Management (with FDA 21Part11 Compliance Checklist)

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Confluence

Confluence: Where work and wellness meet

Feeling overwhelmed by the demands of work and life? With a 25% increase in the prevalence of anxiety and depression worldwide during the pandemic, for most of us, it’s a resounding yes . 🙋‍♀️ ...

903 views 11 26
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you