Confluence saves the page with a reference to an attachment, but no version:
<ac:link> <ri:attachment ri:filename="Attachment.pdf"> <ri:page ri:content-title="Other Page"/> </ri:attachment> <ac:plain-text-link-body><![CDATA[Stuff]]></ac:plain-text-link-body> </ac:link>
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.
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:
- Go to the page in which the attachment is present
- Preview the attachment
- Open the download link in another tab
- It should look like this:
- Copy that link
- Change the version= parameter to the desired version
- Link that to your desired page
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:
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.
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?
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.
It’s been great to hear from fellow users over the last few weeks about the best tips and fun moments you’ve had working on Confluence since the transition to working remote. I’d love to keep the c...
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