Use a control file to attach a file to an ftmap - Fluid Topics - Latest

Map Attachments

Category
Technical Notes
Audience
public
Version
Latest

When using a control file 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>

In the attachment sub node, the only parameter that must be set manually is the filePath parameter. If values for the filename, originId, and/or displayName parameters are not set manually, Fluid Topics extracts their values from that set for the filepath parameter. If a value is not set for the mimeType parameter, Fluid Topics computes it automatically.

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. The second can be retrieved in the document's Metadata journal.