Add an attachment - Fluid Topics - Latest

Fluid Topics Control File

Category
Technical Notes
Audience
public
Version
Latest

Administrators can add an attachment by uploading a control file synchronously or asynchronously.

The following lines show a control file that attaches a resource to a document:

<?xml version="1.0" ?>
<controlFile>
  <resources>
    <resource>
      <filePath>path_to_the_document_to_be_updated</filePath>
      <attachments>
        <attachment>
          <filePath>path_to_the_file_to_attach</filePath>
          <originId>desired_origin_id</originId>
          <displayName>title to display</displayName>
          <filename>filename to display</filename>
          <insertAt>3</insertAt>
        </attachment>
      </attachments>
    </resource>
  </resources>
</controlFile>

It is also possible to asynchronously add an attachment already uploaded to a Fluid Topics portal by targeting it by its khubId as follows:

<?xml version="1.0" ?>
<controlFile>
  <resources>
    <resource>
      <filePath>path_to_the_document_to_be_updated</filePath>
      <attachments>
        <attachment>
          <khubId>khub_id_of_attachment_to_add</khubId>
          <originId>desired_origin_id</originId>
          <displayName>title_to_display</displayName>
          <filename>filename_to_display</filename>
          <insertAt>3</insertAt>
        </attachment>
      </attachments>
    </resource>
  </resources>
</controlFile>