I want to know hotname params in javascript webscript. Informations i need are :
- url protocol (http|https)
- server port
- hostname
Is there a way to find these information in a share or alfresco webscript ?
Thank you.
I want to know hotname params in javascript webscript. Informations i need are :
Is there a way to find these information in a share or alfresco webscript ?
Thank you.
If you're writing a Java webscript, then your best bet is probably to inject the SysAdminParams bean to the webscript as a spring dependency. It is available as a bean with ID sysAdminParams
If you're writing a JavaScript webscript running on the Repository (Alfresco), then there's the ScriptUrl object available as the urls
base script object, which you can use to fetch the details.
If you're writing something on the Share side, often the simplest option is to call the org/alfresco/repository/site/site-share-view-url.get
at something like http://localhost:8080/alfresco/service/api/sites/shareUrl?nodeRef={nodeRef}
. The will return you the fully-qualified URL to view that node in Share, saving you the trouble of building it yourself!