12-01-2021 05:38 AM
Hi,
I would like to see content of pdf file via alfresco CMIS 1.0 AtomPub Service Document.
When I enter this link: http://localhost:8081/alfresco/s/api/node/content/workspace/SpacesStore/26b11458-5059-48dd-989d-9183... to my browser I need to log in and then I can see content of file. Everything works as it should.
I would like to do the same thing in script but I cant find rigth url that would log me in and redirect me to content of file in one url.
Is there a way how this can be done ?
Thanks
12-01-2021 08:20 AM
You can use this kind of URL:
Including your document name ("Sample.pdf") and your document id ("09c6585e-c6a3-4362-9c99-4632a2868d23"). Just remove the "workspace/SpacesStore/" to get this required id.
12-02-2021 03:21 AM
your link do not work. Because I still need to log in in modular window and then i see content.
12-02-2021 04:36 AM
You need to add Basic Auth header. For instance, using curl you can type following command:
curl --location --request GET 'http://localhost:8080/alfresco/api/-default-/public/cmis/versions/1.0/atom/content/Sample.pdf?id=887b6ef5-7651-4c3a-918d-85706364d65a' \ --header 'Authorization: Basic YWRtaW46YWRtaW4='
Explore our Alfresco products with the links below. Use labels to filter content by product module.