AnsweredAssumed Answered

How to get absolute URL in script

Question asked by mfriedel on Aug 9, 2017

I am trying to write a script that among other things creates an entry into a wiki.

For that to work I need an absolute path to a Folder/Container object.

I need a link on which the user can click (and has to authenticate themselves) to get to the directory listing.

 

 

The url in the browser looks like this

 

https://alfresco.mydomain.net/share/page/site/test/documentlibrary#filter=path%7C%2FTest

 

I tried the following document properties/methods..

 

document.shareUrl= undefined
document.displayPath=/Company Home/Sites/test/documentLibrary/Test
document.url: /n/browse/workspace/SpacesStore/e4c4c027-c048-4913-8b32-9e03d7668927

 

None of those are easily usable. Display path has /Company Home/ prefixed. and no uri.

 

So do I have to assemble the URL myself ? I would hate to have to hardcode the servername.

 

 

I am attempting this on a 5.2 Community Edition.

Outcomes