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 one or more files to an Ftmap, prepare a ZIP archive with following elements:

  • The HTML or Markdown topics referred to in the Ftmap file.
  • All files to attach.
  • An Ftmap file with each file to be attached between <ft:attachment> tags as follows:

<ft:map xmlns:ft="http://ref.fluidtopics.com/v3/ft#" ft:lang="en-US" ft:originID="ftmap_id" ft:title="My Map Title"
ft:editorialType="book">
<ft:toc>
<ft:node ft:originID="first_topic" href="topics/topic_1.html" ft:title="My Topic 1" type="topic">
<ft:node ft:originID="origin_id" href="topics/topic_2.html" ft:title="My Topic 2" type="topic">
</ft:node>
</ft:node>
</ft:toc>
<ft:attachments>
<ft:attachment>
<ft:originID>document_1</ft:originID>
<ft:filePath>document_1.png</ft:filePath>
<ft:filename>my_file.png</ft:filename>
<ft:displayName>Document 1</ft:displayName>
<ft:mimeType>image/png</ft:mimeType>
</ft:attachment>
</ft:attachments>
</ft:map>

Where:

  • ft:attachment expects all the information related to the attachment as follows:

Tag

Description

Mandatory?

Default value

ft:originID

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

No

ft:filename

ft:filePath

The path of the file in the archive.

Yes

ft:filename

The name of the file when downloaded.

No

Extracted from ft:filePath

ft:displayName

The name displayed in the Reader page.

No

ft:filename

ft:mimeType

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

No

Computed by Fluid Topics

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