Uploads a new document or creates a new version of an existing document in byte array format to the specified path - UploadDocument4 - Latest version of UploadDocument method

Syntax

Visual Basic (declaration)
Public Function UploadDocument4( _ 
ByVal AuthenticationTicket as String, _ ByVal Path as String, _ ByVal FileContent as Byte(), _ ByVal xmlParameters as String) as XmlNode

C# (declaration)
public XmlNode UploadDocument4( 
string AuthenticationTicket, string Path, byte[] FileContent, string xmlParameters)

Parameters

AuthenticationTicket
    string inforouter ticket
Path
    string An infoRouter document path that to be created or updated
FileContent
    byte[] The Content of the file. The Content must be in the format of the byte array.
xmlParameters
    string The uplad parameters in xml format. see the remarks section.

Return Value

returns xml fragment.
<response success="true" error="">
if success = "true", the document has been uploaded.
if success = "false", the error attribute returns the error description.

Remarks

The caller must have at least "Add" permissions on the folder.
<xmlparameters>
<item NAME="TEXTONLYCONTENT" VALUE="lorem dolor sit amet.."/>
<item NAME="DESCRIPTION" VALUE="this is the sample description of this document"/>
<item NAME="VERSIONCOMMENT" VALUE="sample version comment from the author."/>
<item NAME="CHECKOUT" VALUE="TRUE"/>
<item NAME="MPVERSIONMAJOR" VALUE="1"/>
<item NAME="MPVERSIONMINOR" VALUE="0"/>
<item NAME="MPVERSIONREVISION" VALUE="0"/>
<item NAME="PUBLISHOPTION" VALUE="PUBLISH"/>
</xmlparameters>

xml parameter definitions
TEXTONLYCONTENT: (String) Text content of the document. Client softwares that can do OCR operation on image file can set this parameter.

DESCRIPTION: (String) Document description

VERSIONCOMMENT: (String) Author comment of the version

CHECKOUT: (boolean) (TRUE/FALSE) The document can be automatically checked out if possible.

MPVERSIONMAJOR: (int) 1-2146
MPVERSIONMINOR: (int) 0-999
MPVERSIONREVISION: (int) 0-999

PUBLISHOPTION: (String) possible values might be "Publish" / "DontPublish" / "ServerDefault"