Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to get list of attachments for a space

Dean Robinson July 14, 2023

Hi,

I want to get a list of all the attachments in a space and get it into a CSV/Excel format. The key information I am after is the file name and the page name to which it is attached. If I use the Space Attachments macro - it is the perfect information, but it is listing them in groups of 20 and when I have a few hundred, I am going to have to cut-paste it a bunch of times to get it into CSV/Excel/Table format.

I want the output of that macro but in a big single table. I have also tried using search syntax such as - type:attachment AND spacekey:Key - it creates the search list, but again, not sure how to get that into a CSV/Excel/Table format.

Any ideas/suggestions that would be out of the box without using add ons?

4 answers

3 votes
Sayed Bares [ServiceRocket]
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 14, 2023
Dean Robinson July 14, 2023

Hi @Sayed Bares [ServiceRocket] - thanks for the response. I had actually located that article. It suggests a number of ways to get the list and I have include my own options 4 & 5 below:

  1. Space Admin > Attachments - my problem with this solution is that it lists them in groups of 20. As I state in my question, I have a large number and want to get them into a table - so want to avoid having to cut-paste numerous times. I am going to be doing this on a regular basis, so it is not a once off effort.
  2. Command Line Interface App - as mentioned in my question, trying to avoid apps
  3. Database Query - as it is a repeat, I was hoping to avoid direct database query, but this would possibly work for me, but I will need to get our database admin to run it for me
  4. Space Attachments macro - does the same as 1 above, pages on groups of 20
  5. Content by Label macro - At the moment I am looking at the option of labelling all the attachments I am interested in and using the content by label macro, as I can set the maximum number of pages very high in the macro settings and get what I want. Just means I have to go through and label all my files - lots of them! I don't have the option with the Space Attachments macro in option 4 above to set the maximum number of pages like I can with content by label - doh!! :(

So - was hoping there is an option that would avoid apps/database query and give me a full list without paging at 20.

Let us know any other ideas, otherwise - I will go with either the database query or my option 5 above.

Cheers

Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 19, 2025

Hi everyone,

This post linked to another page which no longer exists as the reference of the answer.  However in Confluence Server/Data Center there is no out-of-the-box means to list all this info into a csv file directly.  The space attachment macro can be useful, but I understand that for large spaces with a lot of attachments, that makes creating a csv file daunting if you can only see 20 attachments at a time. There is a feature request for a means to increase the number of attachment that macro can display over in CONFSERVER-60196 

That said, since this question seems to be for Confluence Server/Data Center, this level of information should be something that could be extracted from the database directly.   There is a KB over in How to search specific attachment type in Confluence which might prove useful.  Granted this is looking for a specific filetype, but you could adjust that SQL query to remove the last AND... from there you should be able to use it to return all the attachments within confluence along with info on which space they are in.

I realize this is not an out-of-the-box solution, but given the means by which confluence can restrict user's ability to view some content, this approach might be a more feasible solution as the SQL export of that data could easily be converted into a csv file.

 

0 votes
Robby Holtmann_IntraFind Software AG_
Atlassian Partner
July 28, 2023

Hi @Dean Robinson

this is one of many features of our app "iFinder Confluence Search". 

If you and your colleagues are also interested in a much better Confluence search, your CSV requirement is also solved with this.

Here is how it works:  Define your filters, go to CSV-export and define the metadate fields for CSV, export the search result list.

CSV Export1.png

CSV Export2.png

So, if you interested anyway on a high qualtiy search solution for Confluence, iFinder Confluence Search is available at Atlassian Marketplace.

It helps even the Confluence user without expert knowledge to search quite intuitively.

This enterprise search solution delivers top results based on linguistic analysis and offers many additional features.

These articles may help you:

 iFinder Confluence Search

 iFinder Search Macro

Let me know, if you need further information or like to get a demo first.

Best

Robby

0 votes
Rodrigo
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.
July 17, 2023

Good day @Dean Robinson,

Our team also saw the need to track and identify attachments and created the Attachment Report within Viewtracker.

This report provides information on how many attachments are in your instance and allows you to filter them by: date name, views, space, file size, unique viewers... and many more!

As well as the possibility of exporting them in CSV form for further analysis in your preferred spreadsheet software. 

We hope this is helpful and are always open to feedback :)

With friendly regards
Rodrigo

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
7.19.4
TAGS
AUG Leaders

Atlassian Community Events