Multiple references (soft/symbolic links?) to a single document, each with own metadata.

RichardLC
RichardLC Member
edited September 26 in Thrust Services #1

Hello all,

For all 'normal' documents uploaded to core content we currently store a customer reference in the custom properties attribute of the metadata for each document, along with some other data like the 'read date'. The first time a customer downloads/reads a document, we set this 'read date'.

This is all handled thru rest api calls.

Once in a while we have the need to upload a single special document that must be available to a large set of customers. We need to be able to track if and when each customer accessed this special document the first time.

In order not to have to store the same large document many many times, I am looking for a way to have multiple sets of metadata, one for each customer, that point to the same physical document.

Does anyone have an idea or suggestion on how this could somehow be accomplished?

All help would be appreciated!

Best regards

Richard

Answers

  • LazarescuA
    LazarescuA E Community Moderator

    Hello,

    The CMS service has two concepts that can help here:

    1. Symbolic link - link the same file to multiple folders (the file will have only one parent_id but can have multiple linked_parent_ids). You can achieve this by a post to /cms/instances/file/cms_file/<instance_id>/linked-parents. You can see the body options in the CMS documentation or API reference. However, this will not allow you to have any metadata attached to it.
    2. Relation objects - the relation object is just like other object instances, can have custom attributes, can have traits attached to it, etc. and will also have the source and target properties to link 2 objects. You can use one single document and create a relation with the required attributes to any other folder or workspace.

    Having said that, you will need to implement your own logic and UI to display these documents and their metadata as Core Content UI will not list the documents linked into a workspace/folder nor will it show you the relations.

    I hope this helps.

  • Hello,

    Thanks for your answer. I'll have a closer look at the second option. It sounds promising.

    As we only show these documents in our customer portal thru the rest api's anyway, the limitations on the UI are no problem for us.

    Thanks again and best regards