Remove an Ftmap Attachment - Fluid Topics - 3.6 - Technical Notes

Manage Map Attachments in Fluid Topics

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

To remove an attachment from an Ftmap:

  1. Remove the <ft:attachment> corresponding to the map attachment to detach.
  2. Reupload the updated FTML archive in the Knowledge Hub.

Example

In this scenario, the following Ftmap file was used to publish a map with a PNG image, a PDF document, and a URL as attachments:

<ft:map xmlns:ft="http://ref.fluidtopics.com/v3/ft#" ft:lang="en-US" ft:originID="ftmap_id" ft:title="Time Machine User Guide"
ft:editorialType="book">
<ft:toc>
<ft:node ft:originID="origin_id" href="topics/how_to_time_travel.html" ft:title="How to Time Travel" type="topic"></ft:node>
</ft:toc>
<ft:attachments>
<ft:attachment>
<ft:originID>drawing</ft:originID>
<ft:filePath>attachments/drawing.png</ft:filePath>
<ft:filename>time_machine_drawing.png</ft:filename>
<ft:displayName>Time Machine Drawing</ft:displayName>
<ft:mimeType>image/png</ft:mimeType>
</ft:attachment>
<ft:attachment>
<ft:originID>spare_parts</ft:originID>
<ft:filePath>attachments/Spare_Part_Price_List.pdf</ft:filePath>
<ft:filename>time_machine_spare_part_prices.pdf</ft:filename>
<ft:displayName>Spare Part Price List</ft:displayName>
<ft:mimeType>application/pdf</ft:mimeType>
</ft:attachment>
<ft:attachment>
<ft:originID>mounting_scheme</ft:originID>
<ft:url>https://timemachines.com/time-machine.jpg</ft:url>
<ft:displayName>Time Machine Mounting Scheme</ft:displayName>
<ft:mimeType>image/jpeg</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.

The ZIP archive used to publish this map and its attachments contained the following elements:

|_time_machine_user_guide.ftmap
|_ topics
|_ how_to_time_travel.html
|_ attachments
|_ drawing.png
|_ Spare_Part_Price_List.pdf

In Fluid Topics, the Time Machine Drawing, Spare Part Price List and Time Machine Mounting Scheme map attachments are available for the Time Machine User Guide.

The steps to remove the Spare Part Price List map attachment are as follows:

  1. Remove the <ft:attachment> corresponding to the PDF attachment in the Ftmap:

    <ft:map xmlns:ft="http://ref.fluidtopics.com/v3/ft#" ft:lang="en-US" ft:originID="ftmap_id" ft:title="Time Machine User Guide"
    ft:editorialType="book">
    <ft:toc>
    <ft:node ft:originID="origin_id" href="topics/how_to_time_travel.html" ft:title="How to Time Travel" type="topic"></ft:node>
    </ft:toc>
    <ft:attachments>
    <ft:attachment>
    <ft:originID>drawing</ft:originID>
    <ft:filePath>attachments/drawing.png</ft:filePath>
    <ft:filename>time_machine_drawing.png</ft:filename>
    <ft:displayName>Time Machine Drawing</ft:displayName>
    <ft:mimeType>image/png</ft:mimeType>
    </ft:attachment>
    <ft:attachment>
    <ft:originID>mounting_scheme</ft:originID>
    <ft:url>https://timemachines.com/time-machine.jpg</ft:url>
    <ft:displayName>Time Machine Mounting Scheme</ft:displayName>
    <ft:mimeType>image/jpeg</ft:mimeType>
    </ft:attachment>
    </ft:attachments>
    </ft:map>

    Only the PNG and JPG references are kept in the Ftmap.

  2. Upload a new ZIP archive of the project with the updated Ftmap and without the PDF file:

|_time_machine_user_guide.ftmap
|_ topics
|_ how_to_time_travel.html
|_ attachments
|_ drawing.png

Once republished, only the Time Machine Drawing and Time Machine Mounting Scheme map attachments are available for the Time Machine User Guide.