This page last changed on Aug 24, 2011 by pwatson.

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.

Using the Attachments Macro

To add the Attachments macro to a page:

  1. In the Confluence editor, choose Insert > Other Macros.
  2. 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 .*jpg, not *.jpg.
Here's a detailed tutorial on regular expressions.

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:

  • date – sorts by reverse chronological order (newest first)
  • size – sorts largest to smallest
  • name – sorts alphabetically

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.


waterfall.jpg (image/jpeg)
office1.jpg (image/jpeg)
editProfile.png (image/png)
editProfile.png (image/png)
summit-slides.zip (application/zip)
Document generated by Confluence on Sep 19, 2011 02:33