This server will be upgraded at 3pm Sydney time on December 3rd (December 2nd, 8pm PST) and will be down for up to 30 minutes.
This documentation relates to the latest version of Confluence.
If you are using an earlier version, please go to the documentation home page and select the relevant version.

Displaying List of Attachments in a Page

All Versions
Click for all versions
Confluence 2.10 Documentation

Index

You need to edit in 'Wiki Markup' mode to include macros in your page.

Use Confluence's Attachments macro to display the list of attachments that belong to a page.

Attachments macro

What you need to type What you will get
{attachments}
  Name Size Creator (Last Modifier) Creation Date Last Mod Date Comment  
JPEG File office1.jpg 94 kB Vidya Madabushi Aug 09, 2005 Aug 09, 2005  
JPEG File waterfall.jpg 1.27 MB Vidya Madabushi Aug 09, 2005 Aug 09, 2005  
File editProfile.png 33 kB Sarah Maddox Oct 08, 2007 Oct 08, 2007  




Optional Parameters

Parameter Default Description
patterns all Specify which attachments to display using filename patterns
old false Include old attachments
sortBy date Specify the sort order for attachments. Valid values are "date", "size" and "name".

1. Filter attachments by filename

{attachments:patterns=.*jpg,.*gif}

Use a comma-separated list of regular expressions to specify the filenames of the attachments you want displayed.

Note

The patterns are regular expressions, so to match a file suffix of 'jpg', use .*jpg, not *.jpg.

Here's a detailed tutorial on regular expressions.


2. Include old attachments

{attachments:old=true}

An optional true/false value determines whether to show old versions of attachments. This is set to false by default.

RELATED TOPICS

Working with Attachments Overview
Working with Macros

Take me back to Confluence User Guide

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Jul 26, 2007

    Carol Kiparsky says:

    In addition to selecting which columns to display, I would like to customize the...

    In addition to selecting which columns to display, I would like to customize the titles of the columns.  Is that possible?

    1. Jul 30, 2007

      Rosie Jameson says:

      Hi Carol, This is not something that Confluence provides out-of-the-box. If you...

      Hi Carol,

      This is not something that Confluence provides out-of-the-box. If you'd like to pursue other options, could I suggest that you try the Confluence forum at http://forums.atlassian.com, or contact Technical Support at http://support.atlassian.com ?

      Regards,
      Rosie 

    2. Jul 30, 2007

      David Peterson [CustomWare] says:

      You could use the Reporting Plugin, something like this.

      You could use the Reporting Plugin, something like this.

  2. Jan 17, 2008

    Anonymous says:

    Is there any way to display the attachments for an entire space (rather than the...

    Is there any way to display the attachments for an entire space (rather than the page) using this macro?  I am currently using the

    Unknown macro: {report-list}
    with the
    Unknown macro: {content-reporter}
    as an alternative but this limits the list to the name only and I can't edit/remove the attachments.  Are there any other ways to accomplish this with the
      Name Size Creator (Last Modifier) Creation Date Last Mod Date Comment  
    JPEG File office1.jpg 94 kB Vidya Madabushi Aug 09, 2005 Aug 09, 2005  
    JPEG File waterfall.jpg 1.27 MB Vidya Madabushi Aug 09, 2005 Aug 09, 2005  
    File editProfile.png 33 kB Sarah Maddox Oct 08, 2007 Oct 08, 2007  

    macro?

    1. Jan 20, 2008

      Choy Li Tham says:

      Hi, May I know if you are using the Reporting plugin macros to display the atta...

      Hi,

      May I know if you are using the Reporting plugin macros to display the attachments for an entire space. If that is the case, Sorry to say that I'm not familiar with the usage of the macros that you have mentioned. Perhaps, you may want to contact the plugin author regarding the problem that you are having via the following link:

      Meanwhile, I have found a similar feature request being tracked at the following:

      The feature request above is pertaining to have a {space-attachments} macro that lists all the attachments in space within Confluence.

      If you are keen on this feature, feel free to case a vote to increase its popularity as well as add yourself as a watcher to get the updates. Also, you may want to add a comment to truly reflect your idea.

      Regards,
      Choy Li

  3. Feb 01, 2008

    Anonymous says:

    I wish we could customize the columns. That would make it a whole lot easier Ja...

    I wish we could customize the columns. That would make it a whole lot easier

    Jake

    dual action cleanse

    1. Feb 01, 2008

      David Peterson [CustomWare] says:

      See here for custom attachment display.

      See here for custom attachment display.

  4. Mar 18, 2008

    R Ganz says:

    The ...

    The

      Name Size Creator (Last Modifier) Creation Date Last Mod Date Comment  
    JPEG File office1.jpg 94 kB Vidya Madabushi Aug 09, 2005 Aug 09, 2005  
    JPEG File waterfall.jpg 1.27 MB Vidya Madabushi Aug 09, 2005 Aug 09, 2005  
    File editProfile.png 33 kB Sarah Maddox Oct 08, 2007 Oct 08, 2007  

    macro works fine in Firefox, but if I include apostrophes within the comments, they appear as the HTML code &apos: rather than '.

    Has anyonw else hit this problem?

    1. Mar 18, 2008

      Choy Li Tham says:

      Hi Ganz, I would suggest you to create a support ticket at the following link a...

      Hi Ganz,

      I would suggest you to create a support ticket at the following link and we will further investigate this issue from there:

      Regards,
      Choy Li

  5. Mar 22, 2008

    CYTEXONE says:

    Was this macro changed in the most recent version?  in 2.7 it would display...

    Was this macro changed in the most recent version?  in 2.7 it would display an alternating background file listing.  It would also keep them displayed quite nicely (as seen above)..  In 2.7.3 the formatting is completely gone.

    Perhaps something is missing out of the CSS?

    Dan

    1. Mar 24, 2008

      Ming Giet Chong says:

      Hi, It would be appreciated if you can raise this issue at our issue tracker: ...

      Hi,

      It would be appreciated if you can raise this issue at our issue tracker:

      Regards,
      MG

  6. Jun 04

    Gregory Wexler says:

    It would be a nice feature if we could customize the fields that are available f...

    It would be a nice feature if we could customize the fields that are available for attachments.  For example, if I wish to add a field name "Project Manager" to an attachment.

  7. Jun 27

    Christopher Christophorou says:

    Hi, is there a way to show the attachments of one page into a different page? ...

    Hi,

    is there a way to show the attachments of one page into a different page?

    Thanks,

    Chris

    1. Jul 01

      Azwandi Mohd Aris says:

      Hi Chris, There is an ongoing feature request, being tracked at: http://jira...

      Hi Chris,

      There is an ongoing feature request, being tracked at:

      Feel free to cast your vote, add your comments or be a watcher to keep yourself updated on the issue.

      Cheers,
      Azwandi

  8. Jul 08

    R Ganz says:

    I know there's an upload option for this, because I've used it, but I now can't ...

    I know there's an upload option for this, because I've used it, but I now can't find any documentation on it. Can anyone point me to it?

    Thanks 

    1. Jul 10

      Ming Giet Chong says:

      Hi R Ganz, The detailed doc regarding attaching file to a page is available at:...

      Hi R Ganz,

      The detailed doc regarding attaching file to a page is available at:

      Hope this helps.

      Regards,
      MG

      1. Jul 10

        R Ganz says:

        Thanks, but that's not what I'm after. I'm currently using the attachments macro...

        Thanks, but that's not what I'm after. I'm currently using the attachments macro with this syntax

        There are currently no attachments on this page.

        . This gives a box where you can enter a file to be uploaded directly on the wiki page, without switching to the attachments page (until you upload the file, which is a little confusing).

         I'm on 2.6.2 and about to upgrade to 2.8.2, but I can't find this option for the macro documented anywhere in either set of documentation, nor do I know how I got it.

        Cheers 

  9. Jul 31

    Anonymous says:

    Hi everybody 2 questions about the  attachment macro: I would like to on...

    Hi everybody

    2 questions about the  attachment macro:

    • I would like to only show the last 5 items uploaded on the page
    • And sort them by the most recent at the top and the oldest by at the bottom

    At this time my macro is the following: "attachments:patterns=.*pdf|upload=true|sortBy=date|time=1m"

    Time parameter doesn't seem to work

    Many thanks

    Best regards

    Pierre

    1. Aug 01

      Tony Cheah Tong Nyee says:

      Hi Pierre, You might want to take a look at the available/valid parameters for ...

      Hi Pierre,

      You might want to take a look at the available/valid parameters for this macro here. There seems to have no parameters called "time". Perhaps you would like to share with us on where the parameter "time" comes from? Do you have a documentation that you could share with us regarding it?

      Cheers,
      Tony

  10. Aug 01

    Frank Erzfeld says:

    Nice feature, but I am getting an additional link at the bottom of the page sayi...

    Nice feature, but I am getting an additional link at the bottom of the page saying "OPEN WEB FOLDER" which will lead to a 404. Any idea what this link is supposed to be for?

    1. Aug 04

      Azwandi Mohd Aris says:

      Hi Frank, The link is supposed to be used in conjunction with WebDAV Plugin. It...

      Hi Frank,

      The link is supposed to be used in conjunction with WebDAV Plugin. It is meant to allow you to open a local directory containing the attachments. However, it is also known that users who do not use this plugin will still be presented with this link. There is a bug report, being tracked at:

      Please add your comments or be watcher to keep yourself updated on the issue. Hope this helps.

      Cheers,
      Azwandi

  11. Aug 13

    Gerin Abraham says:

    Hi , I am encountering an issue with attachments whereby when one uses the ...

    Hi ,

    I am encountering an issue with attachments whereby when one uses the

      Name Size Creator (Last Modifier) Creation Date Last Mod Date Comment  
    JPEG File office1.jpg 94 kB Vidya Madabushi Aug 09, 2005 Aug 09, 2005  
    JPEG File waterfall.jpg 1.27 MB Vidya Madabushi Aug 09, 2005 Aug 09, 2005  
    File editProfile.png 33 kB Sarah Maddox Oct 08, 2007 Oct 08, 2007  

    macro on a page it works fine but the same is not so for a template

    It gives an error msg:Error formating macro :attachments:java.lang.NullPointerException

    Is this a bug ? All the other basic macros like tip, info works fine on templates

    Confluence version: 2.4.3

    Thanks

    Gerin

    1. Aug 19

      Azwandi Mohd Aris says:

      Hi Gerin, To my understanding, the error message is thrown because attachment o...

      Hi Gerin,

      To my understanding, the error message is thrown because attachment objects are not available in the template page. In a normal page, attachment objects are available and accessible by the macro, hence there is no error. However, I have tested this in Confluence 2.9. The error message will not be displayed when you view the template page, but it will appear in the template preview. Hope this helps.

      Cheers,
      Azwandi

Add Comment