It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Attachments macro exclude filename patterns

Actual in the attachments macro you can define which files (with patterns) will be displayed.

Is there also a way to exclude files?

e.g. Display all files except .jpg files

Thanks.

2 answers

1 accepted

2 votes
Answer accepted

Hi Stefan,

I could not find a feature for this in the attachment macro, so I've created a new improvement for you: https://jira.atlassian.com/browse/CONF-29082

I suggest to vote and add your comment to the ticket to increase the chances to be implemented in the future. I hope this helps! :)

Regards,

Rodrigo

I've created a macro with a drop-down list of fileType to Exclude. If you want, add more type of files in the "enumValues" part of the parameter definition:

## Macro title: Exclude File Type Upload Area
## Macro has a body: N
##
## Developed by: Name
## Date created: dd/mm/yyyy

## @param fileTypeExc:title=File Type to Exclude|type=enum|enumValues=png,jpeg,bmp,xlsx,xls,docx,doc,pptx,ppt,zip,rar,pdf|default=png|desc=Select type of file to exclude (ask the Confluence administrator, if you want to exclude more than one type of files)

<p><ac:macro ac:name="attachments"><ac:parameter ac:name="patterns">.*.[^($paramfileTypeExc)]$</ac:parameter></ac:macro></p>

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published Mar 12, 2019 in Confluence

Confluence Admin Certification now $150 for Community Members

More and more people are building their careers with Atlassian, and we want you to be at the front of this wave! Important Dates Start the Certification Prep Course by 2 April 2019 (you can also ...

2,502 views 14 20
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you