Detach 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 detach a map attachment from a Ftmap by its originId, add the following lines to the FluidTopicsControlFile.xml file:

<?xml version='1.0' encoding='utf-8'?>
<controlFile>
<resources>
<resource>
<originId>$FTMAP_ID</originId>
<attachments>
<attachment>
<isAttached>false</isAttached>
<originId>my_attachment</originId>
</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
    • isAttached expects the false value to detach the attachment from the Ftmap.
    • 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.

If a map attachment was added to a map using the legacy (mapping.json) method, you must use its khubId to detach it with the new Control File method.

The attachment is not deleted in case it would be attached to another document in the portal. It is only detached from the document. All its related information (originId, displayName, and so on) are stored for any further use.

Example

The Time Machine User Guide Ftmap has two attachments: the Time Machine Mounting Scheme URL and the Spare Part Price List PDF file.

The Spare Part Price List PDF file was given the following originId when uploaded to Fluid Topics: spare_parts

To detach Spare_Part_Price_List.pdf from the Time Machine User Guide Ftmap, one possibility is to use its originId.

The following lines are added to the FluidTopicsControlFile.xml file to detach the PDF file from the Time Machine User Guide Ftmap:

<controlFile>
<resources>
<resource>
<originId>time_machine_user_guide</originId>
<attachments>
<attachment>
<isAttached>false</isAttached>
<originId>spare_parts</originId>
</attachment>
</attachments>
</resource>
</resources>
</controlFile>

Once published to Fluid Topics, the Spare Part Price List document is not available anymore in the Attachments tab of the Time Machine User Guide Ftmap.