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.
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
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.