Upload Files to the FTP Server
You can use the insert
fetch action to upload files to the FTP server.
The user account that you use to upload the file must have write permission for the destination folder.
To use the insert
action, you must construct some XML that specifies the file to add, and where to insert the file:
<insertXML> <insert> <reference>/incoming/my_file.zip</reference> <file> <type>file</type> <displayname>my_file.zip</displayname> <content>c:\folder\my_file.zip</content> </file> </insert> </insertXML>
The reference
element specifies the destination path for the file on the FTP server.
The file
element specifies the file to insert. For more information about how you can specify the file, refer to the documentation for the insert
action in the FTP Connector Reference.
Add the XML to the insert
action as the value of the insertXML
action parameter. You must URL-encode the XML before adding it to the request:
http://host:port/action=Fetch&FetchAction=Insert &ConfigSection=MyTask &InsertXML=URL-encoded-InsertXML