How do I remove links download file on File Lists page

duongpb I'm New Here Nov 04, 2017

Hello, I want remove links direct download on File Lists page to deny direct download file and force everyone click view button to view file online, how do it?


2 answers

0 vote
Alexey Matveev Community Champion Nov 04, 2017


At the moment, permissions for downloading attachments can't be set. To disable attachment downloading you need to edit your velocity files. But it is not eligible for support by Atlassian.

You can find more information in the following article

duongpb I'm New Here Nov 04, 2017

yes, i disabled link download attachments(tools>attachments), but on File Lists page links still show and i can direct download. I need edit what is file?

Alexey Matveev Community Champion Nov 05, 2017

Velocity files are located on the application server where your confluence is installed. Go to the installation directory of you confluence and search for the file listattachmentsforspace.vm . You will find it. 

You can use Custom HTML to hide links on this page.

Of course it is not a complete solution, it is just a workaround:

AJS.toInit(function ($) {
    if (window.location.href.indexOf("viewpageattachments.action")>-1)  AJS.$("#view-attachments a.filename").attr("href","#");

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...

355 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