cancel
Showing results for 
Search instead for 
Did you mean: 

Direct access to a folder on Share

rodrigoa
Champ in-the-making
Champ in-the-making
Hi everyone,

One request that was made is that one button brings in Share rather than Explorer. I searched for several hours how, without success. I did not find how to build a URL using the node ID (example: 489bcbad-464c-43c8-a2c2-7c21f08bdc0dg).

The only way I've found to be the way it is by CMIS (the workbench), with the property cmis: path.

But the other problem is authentication. The script fetches the current session ticket and returns the URL to Explorer by adding? Ticket = XXXXX. If I try to add? Ticket = XXX (where? Alf_ticket I tried both), it does not pass, Share me authenticate request.

Is there a way to use a ticket with Share? I did several searches on Google, without success, hence my request.

Thank you very much,

Rodrigo.
4 REPLIES 4

davidcognite
Star Contributor
Star Contributor
Hello,

The newly added (4.1) shareUrl API might be of use to you, it can be used to retrieve the URL and site id for any nodeRef, including folders.
e.g.
http://example.com/share/proxy/alfresco/api/sites/shareUrl?nodeRef=workspace://SpacesStore/40afa86a-...
returns:
{
site: "12345",
url: "http://example.com/share/page/site/12345/documentlibrary?path=/test"
}

David.

rodrigoa
Champ in-the-making
Champ in-the-making
Hi David,

Thank you very much for your reply.

Just one more question. Do you how to explain me the problem with authentication? Is there anyway to avoid that Share ask me to authenticate avery time?

Thanks in advance,

Rodrigo.

rodrigoa
Champ in-the-making
Champ in-the-making
Hi David,

I tried to use the URL you gave me as a example but I won the error 401 (Not Authorized). Do you have any ideas?

Thank in advance,

Rodrigo.

davidcognite
Star Contributor
Star Contributor
Hi Rodrigo,

If you've got a valid user session for Share (e.g. you've visited the log in page and logged in) and you send the cookies with the request you shouldn't get a 401 or repeated authentication prompts.

David.