download shared nodes (#3229)

This commit is contained in:
Cilibiu Bogdan
2018-04-25 13:01:00 +03:00
committed by Eugenio Romano
parent 1f72317e93
commit 3bc419e128
2 changed files with 25 additions and 1 deletions

View File

@@ -86,8 +86,10 @@ export class NodeDownloadDirective {
private downloadFile(node: MinimalNodeEntity) {
if (node && node.entry) {
const contentApi = this.apiService.getInstance().content;
// nodeId for Shared node
const id = (<any> node.entry).nodeId || node.entry.id;
const url = contentApi.getContentUrl(node.entry.id, true);
const url = contentApi.getContentUrl(id, true);
const fileName = node.entry.name;
this.download(url, fileName);