upload

Used to upload content to an existing record. The types of content that can be uploaded include content with the field types of binary, image, or note as well as content for a Document object.

Parameters

recordId
The record ID of the content.
content
The binary content.
fieldName
The name of the content field within the primary section of the business object. Set the value to be empty if the content belongs to a Document object.
fileName
The name of the file. This parameter is used for the response object if it is not a Document object. If the record is a Document object, the file name from the record is used.

Errors

InvalidContentException
The recordId or content fields of the content object are incorrect.
InvalidDocumentTypeException
The record is not a document type.
AccessException
The user does not have access to write to the record.
IOException
A system error occurred.

Sample request

<soapenv:Envelope 
	xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 	xmlns:ws="http://ws.tririga.com" xmlns:con="http://content.dto.ws.tririga.com">
   <soapenv:Header/>
   <soapenv:Body>
      <ws:upload>
         <ws:content>
            <con:content>cid:939230577570</con:content>
            <con:fieldName>cstImageIM</con:fieldName>
            <con:fileName>logo.png</con:fileName>
            <con:recordId>5370494</con:recordId>
         </ws:content>
      </ws:upload>
   </soapenv:Body>
</soapenv:Envelope>
Note: The <con:content> node references a file. The utility used to demonstrate the SOAP request does not show the actual file.

Sample response

<soap:Envelope 
	xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" 	xmlns:xsd="http://www.w3.org/2001/XMLSchema" 	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <soap:Body>
      <uploadResponse xmlns="http://ws.tririga.com">
         <return>
            <checksum xmlns="http://content.dto.ws.tririga.com">2833211863</checksum>
            <content ns1:mimeType="image/x-png" xmlns="http://content.dto.ws.tririga.com" xmlns:ns1="http://www.w3.org/2004/11/xmlmime"/>
            <fieldName xmlns="http://content.dto.ws.tririga.com">cstImageIM</fieldName>
            <fileName xmlns="http://content.dto.ws.tririga.com">logo.png</fileName>
            <length xsi:nil="true" xmlns="http://content.dto.ws.tririga.com">9080</length>
            <message xmlns="http://content.dto.ws.tririga.com"></message>
            <mimeType xmlns="http://content.dto.ws.tririga.com">image/png</mimeType>
            <path xsi:nil="true" xmlns="http://content.dto.ws.tririga.com"/>
            <recordId xmlns="http://content.dto.ws.tririga.com">5370494</recordId>
            <status xmlns="http://content.dto.ws.tririga.com">Success</status>
            <updatedDate xmlns="http://content.dto.ws.tririga.com">04/13/2009 07:03:43 PM</updatedDate>
         </return>
      </uploadResponse>
   </soap:Body>
</soap:Envelope>