Update an Ftmap Attachment with a Control File - Fluid Topics - 3.9 - Technical Notes

Manage Map Attachments in Fluid Topics

Product
Fluid Topics
Fluid Topics Version
3.9
Category
Technical Notes
Language
English
Target Audience
public

It is possible to update an existing map attachment by using a control file.

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

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 to rename a map attachment

The following example shows how to rename a document attached to an Ftmap already uploaded to Fluid Topics:

  1. Create a FluidTopicsControlfile.xml control file with a new name in the displayName element.

    <?xml version='1.0' encoding='utf-8'?>
    <controlFile>
    <resources>
    <resource>
    <originId>$FTMAP_ID</originId>
    <attachments>
    <attachment>
    <originId>my_attachment</originId>
    <displayName>The new name for my attachment</displayName>
    </attachment>
    </attachments>
    </resource>
    </resources>
    </controlFile>

  2. Compress the FluidTopicsControlFile.xml file in a ZIP archive.
  3. Upload the ZIP archive to Fluid Topics through the source used to publish the attachment.

There is no need reupload the document.

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.

Example to add a URL to a map attachment

The following example shows how to remove a URL from a document attached to an Ftmap already uploaded to Fluid Topics:

  1. Create a FluidTopicsControlfile.xml control file with an originUrl element.

    <?xml version='1.0' encoding='utf-8'?>
    <controlFile>
    <resources>
    <resource>
    <originId>$FTMAP_ID</originId>
    <attachments>
    <attachment>
    <originId>my_attachment</originId>
    <originUrl>http://my_target_website.com</originUrl>
    </attachment>
    </attachments>
    </resource>
    </resources>
    </controlFile>

    Note: Do not forget to add http:// or https:// at the beginning of the URL. Otherwise, Fluid Topics will not be able to resolve the URL properly.

  2. Compress the FluidTopicsControlFile.xml file in a ZIP archive.
  3. Upload the ZIP archive to Fluid Topics through the source used to publish the attachment.

There is no need reupload the document.

Example to remove a URL from a map attachment

The following example shows how to remove a URL from a document attached to an Ftmap already uploaded to Fluid Topics:

  1. Create a FluidTopicsControlfile.xml control file with an empty originUrl element.

    <?xml version='1.0' encoding='utf-8'?>
    <controlFile>
    <resources>
    <resource>
    <originId>$FTMAP_ID</originId>
    <attachments>
    <attachment>
    <originId>my_attachment</originId>
    <originUrl></originUrl>
    </attachment>
    </attachments>
    </resource>
    </resources>
    </controlFile>

  2. Compress the FluidTopicsControlFile.xml file in a ZIP archive.
  3. Upload the ZIP archive to Fluid Topics through the source used to publish the attachment.

There is no need to reupload the document.