Hi,
I would like to disable downloads for all attachments in Confluence server and have already followed the steps detailed here: https://confluence.atlassian.com/confkb/how-to-disable-attachment-downloads-215484007.html. It is not ideal as even administrators and uploaders will not be able to download their own attachments but that's the only solution we've found. However, we found out that users are still able to download files via the download button that's available when you preview a file. I'm aware that it's possible to disable the preview function altogether, but we need it.
Is it possible to disable only the download button? Will Confluence natively support attachment download controls in the future?
Hi @jinpao,
I don't think complete solution for this.
Please refer below link, these may help
https://community.atlassian.com/t5/Confluence-questions/attachment-download-disable/qaq-p/153206
https://confluence.atlassian.com/confkb/how-to-hide-download-all-links-for-attachments-in-confluence-834213692.html
Is there a solution for this yet?
after many attempts, I got a solution:
extract mediaviewer.all.js from confluence-previews-7.0.11.jar, then changed
var tpl = handlebars_1.compile('\n <a role="button"\n tabindex="55"\n href="#"\n aria-label="{{label}}"\n class="cp-control-panel-download cp-icon"\n target="_blank"\n download>\n <span class="tooltip tooltip-n">{{label}}</span>\n </a>\n');
to
var tpl = handlebars_1.compile('');
finally, add mediaviewer.all.js into confluence-previews-7.0.11.jar
hope can help you.
tested this method on Confluence 6.15.1, it worked
It looks like you're new here. Sign in or register to get started.