Get contentUrl value in alfresco javascript

cancel
Showing results for 
Search instead for 
Did you mean: 
mitpatoliya
Moderator
Moderator

Get contentUrl value in alfresco javascript

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
afaust
Master

Re: Get contentUrl value in alfresco javascript

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.