问题
My scenario is this..
I am having a web application which uses the ALFRESCO CMS to display files or images. What I am doing is I login to alfresco using username and password in a Java servlet and I can able to get a ticket for that login. But I could not able to access the file/image from browser directly with that ticket. When I launch the url (with ticket) from the browser it goes to alfresco login page for credentials.
Do we have any way to login to alfresco programmatically and get the ticket and show the file/content directly in browser using that ticket. (Note: I do not want to pass the username and password via GET)
Please help. Thanks in Advance.
回答1:
You can do that following this Wiki page providing the url as a parameter.
So for example it will look like
/alfresco/download/direct/workspace/SpacesStore/0000-0000-0000-0000/myfile.pdf?ticket=1234567890
Or for short
/alfresco/d/d/workspace/SpacesStore/0000-0000-0000-0000/myfile.pdf?ticket=1234567890
来源:https://stackoverflow.com/questions/22014158/access-file-content-directly-from-alfresco-without-log-in