Detecting unknown attachments in Confluence – How to use ScriptRunner for tidy Confluence pages
If you've been using Confluence for a while, you've probably encountered the following problem more than once: You go to an important Confluence page that you’ve created some time ago or that a colleague sent you and want to open a significant file stored on the page. However, where you would normally see the file preview, an “Unknown Attachment” icon appears.
Therefore, you cannot open the desired file and work with it.
This problem often causes unnecessary queries or a longer search for the desired file, which can also put your project behind schedule.
In general, it is important to always maintain your Confluence pages and replace these unknown attachments with the correct files. Though, it is especially important when you are about to migrate your Confluence instance, because the resulting confusion often makes it harder to find data again.
Exactly this problem with many "Unknown Attachments" icons occurred with one of our customers. The customer had been using Confluence for 15 years and was about to migrate from server to cloud. That's why he asked our Atlassian Consultant Victoria for help. Victoria immediately knew what to do and helped the customer solve the problem quickly and effectively.
In this article, we will explain why this problem occurs and how you can find all these "Unknown Attachments" on your instance in no time, using our consultant Victoria's method to replace them with the correct file.