cancel
Showing results for 
Search instead for 
Did you mean: 

how to disable download document action on alfresco 5.0D

agung_tarecha
Champ in-the-making
Champ in-the-making
how to disable download document action on alfresco 5.0D community edition?

I have try tutorial for alfresco 4 but nothing happen. I still can download document
1 ACCEPTED ANSWER

hardik1512
Star Contributor
Star Contributor
Hello,

I don't know any configuration for this but it can be done by overriding pdfjs.get.js file.
Here are the steps you can follow if you are using alfresco 5.0
1) Copy attached pdf-extension.xml file at tomcat\webapps\share\WEB-INF\classes\alfresco\web-extension\site-data\extensions folder under your Alfresco. 
2) Copy attached pdfjs.get.js file at tomcat\webapps\share\WEB-INF\classes\alfresco\web-extension\site-webscripts\custom\pdf folder under your Alfresco.
3) Restart Alfresco.

This should disable download button which you show in your attachment.

Hope this helps.

View answer in original post

26 REPLIES 26

muralidharand
Star Contributor
Star Contributor
I already posted the solution here, please try.
https://forums.alfresco.com/comment/161668#comment-161668

you said it's not working !!!!!

marylong68
Champ in-the-making
Champ in-the-making
You said it's not working………

muralidharand
Star Contributor
Star Contributor
Yes, unfortunately, I was changing the configuration in another version of Alfresco instance. 😞

You need to use, share-custom-config.xml and it needs to placed under web-extension folder.
C:\Alfresco50d\tomcat\webapps\share\WEB-INF\classes\alfresco\web-extension\share-config-custom.xml
To remove the download Icon from the document-details header, you need to extend or overwrite the node-header.get.js and you need to set the
AlfrescoUtil.param("showDownload", "true"); to  AlfrescoUtil.param("showDownload", "false"); .

You need to place this file,  C:\Alfresco50d\tomcat\webapps\share\WEB-INF\classes\alfresco\web-extension\site-webscripts\org\alfresco\components\node-details\node-header.get.js

To disable the download options form preview, use this, https://forums.alfresco.com/comment/158771#comment-158771

Now only the admin and SiteManager can download the documents / folders.
One issue here, if the user creates any documents that can be download and I will check on this, for the restrictions.

Refer this, https://forums.alfresco.com/comment/161668#comment-161668

Thanks,
Murali

jithin
Champ in-the-making
Champ in-the-making
Murali,
Can u give your contact info

shyam2016
Champ in-the-making
Champ in-the-making

Hi Hardik1512 _

I followed your instructions and its disabling the download button in PDF viewer.

But i want hide this download button (PDF viewer) based on user role.

i think for that i need to extend the pdfjs.js method.

Can you please help me how do i extend the pdfjs method?

Thanks !

tushar_khanka
Confirmed Champ
Confirmed Champ

Latest version of pdfJs from mozilla offers a functionality of printing the document. Can anyone help me with a lead if i have to upgrade the pdfJs version in alfresco 5.2 C.E