Attachment Macro: How do I hide the Download All option?

Using Confluence 5.7.1

Not afraid to add/modify code if necessary.

We don't want people to have the Download All option for the Attachment Macro.   The PDFs shown in the Attachment Macro on a page are view-only and should not be downloaded by users from this page.   Is there a way to disable this option on a single page or all pages (if single page is not possible)?  We do want to allow downloading of attachments in different pages or spaces, but want to control it in this page and maybe others.

 

Thanks,

 

Jeremy Soronen

2 answers

0 vote

Hi Jeremy, 

 

Not sure if it would help you, but, you can find some codes in this doc, you can find some options on how to disable the download for specific attachments or for the whole space. smile

 

Cheers, 

Giu

0 vote

Howdy @Jeremy Soronen,

I know this is a little late, but I have a solution for you!

You can add the following to either the Global Stylesheet (for all pages), specific Space Stylesheets (for all pages in those spaces), or you can use the HTML macro (which needs to be enabled) to include it in specific pages:

a.download-all-link {
    display: none !important;
}
a#download-all-link {
    display: none !important;
}

The first block will hide the link generated by the Attachments Macro, while the second will hide the link displayed on the View Page Attachments screen. Hopefully this helps out!

Cheers,
Stephen Brannen | Confluence + Crowd Support

@stephen Brananen,  Does this work if confluence is an ondemand instance?  

I have looked and Have found PDF STYLESHEET Option, I did the change but nothing happened after saving. 

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

345 views 20 10
Join discussion

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