Listing Attachments from Current Space

Scenario

The Attachments macro only extracts attachment information from the current Confluence space. This recipe shows how to report on all attachments within the current space. The results are displayed in a table sorted by file size in descending order.


Result


Recipe

Ingredients

Add-ons

Reporting

Platform

N/A

Level

EASY

Estimated time

15 minutes

Macros

Suppliers

Storage format

Macro structure

You can recreate the example in the editor view:

Steps

  1. Create a Report Table macro.

  2. Within the Report Table macro, create a Content Reporter macro.

  3. Within the Content Reporter, create a Number Sort macro.
    Specify the following parameters:
    • Key:  content:file size
    • Order:  descending

  4. Still within the Content Reporter, create a Text Filter macro.
    Specify the following parameters:
    • Key: attachment:title
    • Required: true

  5. Within the Report Table, create a Report Column macro.
    Set the Title to "File Name".

  6. Within the Report Column macro, create a Report Info macro.
    Specify the following parameters:
    • Key: attachment:title
    • Link to Item: true

  7. Within the Report Table, create another Report Column macro.
    Set the Title to "Page".

  8. Within the Report Column macro, create a Report Info macro.
    Specify the following parameters:
    • Key: attachment:attached to
    • Link to Item: true

  9. Within the Report Table, create another Report Column macro.
    Set the Title to "Size".

  10. Within the Report Column macro, create a Report Info macro.
    Specify the following parameters:
    • Key: attachment:nice file size

  11. Within the Report Table macro, create a Report Empty macro.