Hi All,
I need to enable the download button for all the documents instead of just image files while sharing for external users.
Currently it is enable for image file only. so I have replaced model.showDownload = "false" with model.showDownload = "true" in quickshare/node-header.get.js.
now it is enable for all types of documents but the download button is not working for external users. It is neccessary to login to download the documents. since external users dont have any access but I want them to be able to download the documents.
The quickshare/node-header.get.html.ftl file needs a "contentURL" for download option and its getting blank in case of no login. and due to this download button is not working.
I have tried by overriding download.get.desc.xml and changed <authentication>user</authentication> to <authentication>guest</authentication> but it didn't worked. I don't know am I on the correct way.
Is there any way I can do this. Basically I want to remove or bypass the authentication so that external users can download the documents.
Please guide me over this if anybody have any idea about it.
Thanks,
Monica
Solved! Go to Solution.
The download button shows for any file type as long as the user has read access on the node. So there shouldn't be any customization necessary for that.
How do you want users to get to the documents? If quickshare works for you, what about writing a script that makes the document shared? You could trigger it from a rule, for example. Or, if you want to trigger it from a web script, see this thread.
If you want users to use regular Share to get to the documents, add the EVERYONE group as a Consumer to your site.
If neither of those options sound good, you could write a web script that runs as the administrator and streams the content. This option would completely by-pass security.
Similarly, you could write a small application which would use CMIS or the REST API to fetch the documents using a 'service account'. You would need to grant the service account read access to the folder(s) or content items you want to make available to the application. Your application can then either use its own authentication or no authentication at all. Your application is kind of like a proxy in this respect.
So there are a lot of ways to let users download content without authenticating. It just depends on exactly what you are trying to do.
Hope these ideas helped,
I have called the REST API..
alfresco/api/-default-/public/alfresco/versions/1/shared-links/${shareId}/content
for example, http://localhost:8080/alfresco/api/-default-/public/alfresco/versions/1/shared-links/666BIWoXQSWGJEsusAVy-g/content and it worked.
Just replaced <a href="${url.context}/proxy/alfresco${(contentURL!"")?html}?a=true" tabindex="0">${msg("button.download")}</a>
with
<a href="${url.context?replace("/share", "/alfresco")}/api/-default-/public/alfresco/versions/1/shared-links/${shareId}/content" tabindex="0">${msg("button.download")}</a>
in quickshare/node-header.get.html.ftl and added model.shareId = shareId; in quickshare/node-header.get.js.
and it worked.
Thanks for your help.
The download button shows for any file type as long as the user has read access on the node. So there shouldn't be any customization necessary for that.
How do you want users to get to the documents? If quickshare works for you, what about writing a script that makes the document shared? You could trigger it from a rule, for example. Or, if you want to trigger it from a web script, see this thread.
If you want users to use regular Share to get to the documents, add the EVERYONE group as a Consumer to your site.
If neither of those options sound good, you could write a web script that runs as the administrator and streams the content. This option would completely by-pass security.
Similarly, you could write a small application which would use CMIS or the REST API to fetch the documents using a 'service account'. You would need to grant the service account read access to the folder(s) or content items you want to make available to the application. Your application can then either use its own authentication or no authentication at all. Your application is kind of like a proxy in this respect.
So there are a lot of ways to let users download content without authenticating. It just depends on exactly what you are trying to do.
Hope these ideas helped,
I have called the REST API..
alfresco/api/-default-/public/alfresco/versions/1/shared-links/${shareId}/content
for example, http://localhost:8080/alfresco/api/-default-/public/alfresco/versions/1/shared-links/666BIWoXQSWGJEsusAVy-g/content and it worked.
Just replaced <a href="${url.context}/proxy/alfresco${(contentURL!"")?html}?a=true" tabindex="0">${msg("button.download")}</a>
with
<a href="${url.context?replace("/share", "/alfresco")}/api/-default-/public/alfresco/versions/1/shared-links/${shareId}/content" tabindex="0">${msg("button.download")}</a>
in quickshare/node-header.get.html.ftl and added model.shareId = shareId; in quickshare/node-header.get.js.
and it worked.
Thanks for your help.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.