Attach a Document by its originId - Fluid Topics - 3.7

Manage Map Attachments in Fluid Topics

Product
Fluid Topics
FT_Version
3.7
Category
Technical Notes

To add a map attachment from an Ftmap to another Ftmap instance by its originId, add the following lines to the FluidTopicsControlFile.xml file:

<controlFile>
<resources>
<resource>
<originId>$ID_OF_THE_MAP_TO_ATTACH_THE_DOCUMENT</originId>
<attachments>
<attachment>
<sourceId>$ORIGINAL_SOURCE</sourceId>
<originId>$ATTACHMENT_ORIGIN_ID</originId>
<displayName>My attachment</displayName>
</attachment>
</attachments>
</resource>
</resources>
</controlFile>

Where:

  • resource
    • originId expects the ft:originID defined for the Ftmap in the Ftmap file. It can be retrieved from the Metadata Journal, in the ft:originId field. If no ft:originID was defined, it takes the Ftmap filepath value.
  • attachment
    • sourceId is the ID of the source originally used to upload the attachment. It is mandatory only if it is not the source used to upload the map to which the map attachment is to be attached.
    • originId expects the ft:originID defined for the attached file when uploaded to Fluid Topics. It can be retrieved from the Metadata Journal, in the ft:originId field. If no ft:originID was defined, it takes the Ftmap filepath value.
    • displayName is the title of the file to attach. It is displayed in the Attachments tab and can be clicked for a direct access to the attachment. In the case of reusing an existing map attachment, if the displayName does not match the initial one, then it overrides it.

If displayName, filename, or mimeType are not defined in the control file, the attachment keeps the current value of its other occurrences.

If a parameter is defined, e.g., displayName, it impacts also all already existing occurrences of the attachment.

Example

The Spare_Part_Price_List.pdf file was initially attached to the Time Machine User Guide Ftmap and given the spare_parts originId.

The Time Machine Configuration Guide Ftmap already has the time_machine_drawing.png file.

To add Spare_Part_Price_List.pdf to the Time Machine Configuration Guide Ftmap, one possibility is to use its originId.

The following lines are added to the FluidTopicsControlFile.xml file to add the PDF to the Time Machine Configuration Guide Ftmap:

<controlFile>
<resources>
<resource>
<originId>time_machine_configuration_guide</originId>
<attachments>
<attachment>
<originId>spare_parts</originId>
</attachment>
</attachments>
</resource>
</resources>
</controlFile>

Once published to Fluid Topics, the Spare Part Price List PDF is now available in the Attachments tab of the Time Machine Configuration Guide Ftmap.