02-27-2018 08:55 AM
Hi
I tried the below code
URI uri = new URI("http://127.0.0.1:8080/share/proxy/alfresco/api/node/content/workspace/SpacesStore/99c9f0ab-c78a-4980...");
File f = new File(uri);
I am getting the error as "URI scheme is not file". But when i put the http://127.0.0.1:8080/share/proxy/alfresco/api/node/content/workspace/SpacesStore/99c9f0ab-c78a-4980... in browser, I could be able to see my document opening in the browser window.
My question is then what will be the correct URI (how to get the URI) that refers to my document so that i could create a reference File object for the document present in Alfresco.
Any help appreciated.
02-28-2018 12:45 AM
Hi,
You can not use URI directly like this, you can see the document in the browser with this URI because you are accessing the document by making an http request and you are authorized to Alfresco repository.
You can use various Java or JavaScript APIs or services like NodeService to access the 'NodeRef' of a document within Alfresco.
You can get all the document related information(metadata and content) with the help of this NodeService.
For more information refer NodeService | Alfresco Documentation
Please let me know if you have any further query.
Thanks,
Kalpesh
03-13-2018 09:33 AM
Explore our Alfresco products with the links below. Use labels to filter content by product module.