Attach a File to an Ftmap - Fluid Topics - 3.9 - Technical Notes

Manage Map Attachments in Fluid Topics

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

To attach a file 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>
<filePath>$PATH_TO_THE_ATTACHMENT_FILE</filePath>
<filename>$DOWNLOAD_FILENAME</filename>
<displayName>My attachment</displayName>
<mimeType>$ATTACHMENT_MIME_TYPE</mimeType>
</attachment>
</attachments>
</resource>
</resources>
</controlFile>

Where:

  • In the <resources> sub node, originId expects the unique ID used to upload the Ftmap to Fluid Topics.
  • The <attachment> sub node expects all information related to the attachment as follows:

Tag

Description

Mandatory?

Default value

originId

The identifier of the attachment. Should be unique among all content uploaded through the FTML source.

No

filename

filePath

The path of the file in the archive.

Yes

filename

The name of the file when downloaded.

No

Extracted from filePath.

displayName

The name displayed in the Reader page.

No

filename

mimeType

The MIME type indicating the nature and format of the content.

No

Computed by Fluid Topics.

While not mandatory, defining an originId for the map attachment is recommended.

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 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 available in Attachment tab of the Reader page when users view the the Time Machine User Guide map.