Rest Api : Link a File to a Site

cancel
Showing results for 
Search instead for 
Did you mean: 
janv
Alfresco Employee

Re: Rest Api : Link a File to a Site

You need to "create [the symbolic] link" in a new parent folder, hence use POST .../nodes/{parentFolderNodeId}/children:

Alfresco Content Services REST API Explorer 

The "cm:destination" property points to the source file. It should be noted that this is a pre-existing model as currently used by Share. Here the snippets from ...

applicationModel.xml

<type name="app:filelink">
   <title>File Link Object</title>
   <parent>cm:link</parent>
</type>

contentModel.xml

<type name="cm:link">
   <title>Link Object</title>
   <parent>cm:cmobject</parent>
   <properties>
      <property name="cm:destination">
         <title>Link Destination</title>
         <type>d:noderef</type>
         <mandatory>true</mandatory>
      </property>
   </properties>
</type>

Regards,

Jan