cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco Document Link: 'Remove Document' removes original, too

technaton
Champ in-the-making
Champ in-the-making
I'm trying to set up a simple web script which provides document links. I've created a document library action and the appropriate controller script,
linkTo.post.js
. Things initially work as expected. I create the link using the <javascript>newParentFolder.addNode(documentNode)</javascript> method.

However, deleting the link also deletes the original. I had a look at the Alfresco source code and found that deleting a document is simply a call to <javascript>node.remove();</javascript>, of which the JavaScript API documentation states that it deletes the node (in contrast to <javascript>folder.removeNode()</javascript>).

Now this is obviously not what I want. Removing the link should remove only the link, not the orginal node. I'd like to mimic the behaviour of Unix symbolic links. I suppose I need to create a special node in the destination folder for that. But how to I do that? Are aspects the right way to go here?

If anybody's interested, my current (alpha-quality) code lives on <a href="https://github.com/Wilhelm-Buechner-Hochschule/link-to">GitHub</a>. The development environment is Alfresco Community 4.2.c.

Thanks a lot in advance!

— Eric
1 REPLY 1

eleutian
Champ in-the-making
Champ in-the-making
Hi Technaton,

I also want to "soft link" folders and files, and it looks like your code on GitHub may be just what I need! Can you please share how to install this please? Thank you very much in advance.
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.