# Insert Files into Vantara

The connector's `insert` fetch action can insert files into a Vantara file system. To use the `insert` action, you must construct some XML that specifies where to add each file, and the information to insert.

To insert a file, set the `reference` to the path where you want to insert the file. Use the `file` element to specify the content to insert. There are several ways that you can do this, for example specifying the path to a file or providing the content base-64 encoded. For more information about how to specify the source file, refer to the documentation for the `insert` action in the Vantara Connector Reference.

The following example would insert `file.txt` in a directory named `folder`, in the file system `/Projects`. The file would contain the content "This is my file".

    <insertXML>
        <insert>
            <reference>/Projects/folder/file.txt</reference>
            <file>
                <type>content</type>
                <content>VGhpcyBpcyBteSBmaWxl</content>
            </file>
            <insert_id>012345</insert_id>
        </insert>
    </insertXML>

Add this XML to the insert fetch action as the value of the `insertXML` action parameter. The XML must be URL encoded before being used in the action command. For example:

    http://host:port/action=Fetch&FetchAction=Insert
                                 &ConfigSection=MyTask
                                 &InsertXML=[URL encoded XML]

For more information about using the `insert` fetch action, refer to the Vantara Connector Reference.

_FT_HTML5_bannerTitle.htm