SharePoint Remote Connector 12.12

# 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 2022 Micro Focus or one of its affiliates
Version 12.12 | Last updated June 2022

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 swpdl.idoldocsfeedback@microfocus.com.

We appreciate your feedback!

Product: IDOL SharePoint Remote Connector 12.12

Topic Title: Insert a File