SharePoint Remote Connector 25.1
SharePoint Remote Connector Help

# Insert a File

To insert a file, the `insertXml` must include the following properties.

`TYPE` | The type of item to insert. To insert a file, specify `FILE`.
`PATH` | The path of the file, including the filename, relative to the root of the list.

You must then specify either (`LISTID`, `SITEID`, and `SITECOLLECTIONURL`) or (`INSERTFROMPATH`, `SITEURL`, and `LISTNAME`).

`INSERTFROMPATH` | To insert a file by path, set this to `TRUE`.
`LISTID` | The GUID of the list to which you want to add the file.
`LISTNAME` | The name of the list to which you want to add the file.
`SITECOLLECTIONURL` | The absolute URL of the site collection to which you want to add the file.
`SITEID` | The GUID of the site to which you want to add the file.
`SITEURL` | The absolute URL of the site to which you want to add the file.

For example, the value of your `insertXML` action parameter might look like this:

    <insertXML>
      <insert>
        <reference>TEST_FILE</reference>
        <property name="TYPE" value="FILE"/>
        <property name="PATH" value="folder/subfolder/somefile.file"/>
        <property name="LISTID" value="26FFE115A45AF1F1"/>
        <property name="SITEID" value="E11526FFA45AF1F1"/>
        <property name="SITECOLLECTIONURL" value="http://sharepoint/SiteCollection/"/>
        <file>
          <type>file</type>
          <content>e:\my_files\myfile.doc</content>
        </file>
      </insert>
    </insertXML>

To insert a file by path, your XML might look like this:

    <insertXML>
      <insert>
        <reference>TEST_FILE</reference>
        <property name="TYPE" value="FILE"/>
        <property name="PATH" value="folder/subfolder/somefile.file"/>
        <property name="LISTNAME" value="MyList"/>
        <property name="SITEURL" value="http://sharepoint/SiteCollection/Site/"/>
        <property name="INSERTFROMPATH" value="TRUE"/>
        <file>
          <type>file</type>
          <content>e:\my_files\myfile.doc</content>
        </file>
      </insert>
    </insertXML>

Copyright 2024 Open Text
Version 25.1 | Last updated January 2025

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to MFI-swpdl.idoldocsfeedback@opentext.com.

We appreciate your feedback!

Product: Knowledge Discovery SharePoint Remote Connector 25.1

Topic Title: Insert a File