cancel
Showing results for 
Search instead for 
Did you mean: 

Get contentUrl value in alfresco javascript

mitpatoliya
Star Collaborator
Star Collaborator

Hello Community Members,

Can anybody suggest if it is possible to fetch contentURL of node in alfresco javascript?

Most of the properties of nodes are accessible in alfresco javascript(repo side) but not the contentURL.

I know the hard way where we can create spring bean & expose the function of that in js to get what we need but I don't have that much time to do development.

 Thanks in advance.

1 REPLY 1

afaust
Legendary Innovator
Legendary Innovator

If you use classpath-stored JavaScript or the JavaScript console, you can use the JavaScript-Java Interop capabilities to access the NodeService/ContentService beans, obtain the content data /  ContentReader of a node, and access its content URL details. You can find an example on how to access the NodeService in a Gist of mine.