Remove an Attachment Using its originId - Fluid Topics - 3.6 - Technical Notes

Manage Map Attachments in Fluid Topics

Product
Fluid Topics
FT_Version
3.6
Category
Technical Notes
language
English
audience
public

To remove 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.
  • 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. If no ft:originID was defined, it takes the Ftmap's filepath value.

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



- It is possible to validate the control file against the following XML Schema Definition (XSD) file: https://ref.fluidtopics.com/3.5/control_file.xsd.

- Be careful not to confuse the originId metadata associated with a map attachment and the originId metadata associated with a map. The first is defined at the attachment level within the <ft:attachment> node of an Ftmap file, whereas the second can be retrieved in the Metadata journal.

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 no longer available in the Attachments tab of the Time Machine User Guide Ftmap.