Attach a Document to an Ftmap - 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 to an Ftmap, 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>
<originId>my_attachment</originId>
<displayName>My attachment</displayName>
<filePath>$PATH_TO_THE_ATTACHMENT_FILE</filePath>
<filename>$DOWNLOAD_FILENAME</filename>
<mimeType>$ATTACHMENT_MIME_TYPE</mimeType>
</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
    • originId is the ID given to the file to attach. Make sure that the originId is unique within ALL the Ftmap attachments.
    • 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.
    • filePath expects the relative or absolute path to the file to attach in the archive. This parameter is mandatory.
    • filename expects the filename of the document to download from the Viewer page.
    • mimeType is the MIME type corresponding to the content of the attachment. It is used to override the attachment type calculated by Fluid Topics.

Indicating an originId for the map attachment is recommended.

Example

The following lines show how to attach the Spare Part Price List PDF file to the Time Machine User Guide Ftmap:

<?xml version='1.0' encoding='utf-8'?>
<controlFile>
<resources>
<resource>
<originId>user_guide</originId>
<attachments>
<attachment>
<originId>spare_parts</originId>
<displayName>Spare Part Price List</displayName>
<filePath>Spare_Part_Price_List.pdf</filePath>
<filename>time_machine_spare_part_prices.pdf</filename>
<mimeType>application/pdf</mimeType>
</attachment>
</attachments>
</resource>
</resources>
</controlFile>

Once published to Fluid Topics, Spare Part Price List is now available in the Time Machine User Guide Ftmap Attachment tab:

One map attachment was added with the control file