cancel
Showing results for 
Search instead for 
Did you mean: 

Public link to download file

maiconramones
Confirmed Champ
Confirmed Champ

Hello guys,

I send files through the API to the site, it's OK.

But now some kind of files need a public link to download a file. This link should be a public without login, ie download a file in e-mail, download a file in a website.

How can I achieve this?

Alfresco version: Community - 5.2.0 (re21f2be5-b22)

1 ACCEPTED ANSWER

jpotts
World-Class Innovator
World-Class Innovator
6 REPLIES 6

jpotts
World-Class Innovator
World-Class Innovator

Go to the Alfresco API Explorer and take a look at Shared Links.

How would I filter by site and get a list of paths?

Hi,

You need to create custom webscript where first find all shared node and then fillter by site and return.

Here is webscript example.

var def = {
	query: "ASPECT:'qshare:shared'",
	language: "fts-alfresco"
};

var nodes = search.query(def); 

for each(var node in nodes) {
    logger.log(node.nodeRef + " ; " + node.properties["qshare:sharedId"] + " ; " + node.webdavUrl);
}

EddieMay
World-Class Innovator
World-Class Innovator

Hi @eswbitto 

I'd generally recommend starting your own thread rather than adding to a much older post.

Cheers,

Digital Community Manager, Alfresco Software.
Problem solved? Click Accept as Solution!

I should have thought of that. I'll create a new post. My apologies.

maiconramones
Confirmed Champ
Confirmed Champ

Thanks to Jeff, it was my fault.


It works perfectly. It would be nice if Alfresco had the option to enable sharing when creating the document and the URL for sharing in json return. This would avoid two calls to an Alfresco API.


Thank you again.