Confluence 4.0 has reached end of life
Check out the [latest version] of the documentation
Use Confluence's Attachments macro to display a list of the files attached to the current page.
It will generate a table similar to that in the screenshot below.
On this page:
Using the Attachments Macro
To add the Attachments macro to a page:
- In the Confluence editor, choose Insert > Other Macros.
- Find and select the required macro.
Parameters
When editing, you can click on the macro placeholder and choose Edit to display the parameters for this macro in the Macro Browser.
Parameters are options that you can set for Confluence macros to control the content or format of the macro output. The table below lists parameters for this macro that can be set in the Macro Browser.
Parameter |
Default |
Description |
|---|---|---|
Filename Patterns |
all |
Filters the attachments to display, using a comma-separated list of regular expressions. So, to match a file suffix of 'jpg', use |
Include Old Attachment Versions |
false |
Include previous attachment versions in the list. |
Sort By |
date |
Specifies the sort order for attachments. Note that people viewing the page can change the sort order by clicking the column headings. Valid values are:
|
Allow Upload |
false |
Provides the ability to browse for, and attach, new files. |
Viewing and Editing Files from the Attachments Macro
If an attachment is an Office or PDF file, you will see a View link as shown in the screen snippet below. Furthermore, if the attachment is an Office file, it will also have an Edit link.
Screenshot: Office and PDF file page attachments showing the 'View' and 'Edit' links
Click View to view the content of the Office file within Confluence.
Click Edit to edit the content of the Office file in your Office application. You must have a compatible Office application installed to do this. Refer to Working with the Office Connector for more information.
Attachment Information Icon
When a page you are viewing contains attachments, a small paperclip icon appears next to the page byline. Clicking the paperclip will take you to the 'Attachments' view, where the full list of attachments is displayed.Notes
The macro can only list the attachments on the current page. It is not possible to display attachments from another page. If you are interested in this feature request, please watch or vote for CONF-6351.
Related Topics
Working with Attachments
Working with Macros
Take me back to the Confluence User's Guide.


1 Comment
ahmed
Dec 28, 2011Hi I receive this error when i insert the attachment Macro :
Error rendering macro 'attachment' : null
Environment : Confluence 4.0.4 Build 3057
Thanks in advance for help.