Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a way to identify whether an attachment is visible on a page?

Henry Edwards
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 7, 2022

I'm aiming to delete duplicated attachments from a Confluence instance using the rest API. There are multiple duplicated files which are attached to pages but not visible on the page, and not being used, hence we're looking to delete them.

 

Is there a field which can be used with the rest API to identify attachments which are attached to a page but don't appear on it?

1 answer

0 votes
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 7, 2022

Welcome to the Atlassian Community!

All attachments are visible on a page, if the person looking has permission to see the page.

I think you mean "does the page include a 'show attachment' macro/function so the attachment is partially or fully rendered when viewing the page".  

It is a technical quibble on the wording, but it is important because the answer to "is an attachment visible on a page" is simply "yes". 

I think the answer you are looking for is "not easily".  You would need to search all of your page content for the macros that make attachments render on the page, and bear in mind that a most of those macros do not limit themselves to "file attached to the current page" - most can draw in attachments from other pages.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events