Attach a file to an ftmap - Fluid Topics - Latest

Map Attachments

Category
Technical Notes
Audience
public
Version
Latest

To attach one or more files to an Ftmap, prepare a ZIP archive with the following elements:

  • The HTML 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.