uploadFrom
Used to upload large amounts of content to Document objects.
- To avoid transferring binary data over HTTP, a full network path references the uploaded content.
- The location of the referenced files must be fully accessible from the application server.
- All instance level security applies to the content that is uploaded to the Document object.
- Each request is broken up into threads that originate from the DataImportAgent thread setting because the operation takes in a collection of objects. The DataImportAgent does not need to be active for this operation.
Parameters
- recordId
- The record ID of the Document object that the content is uploaded to.
- path
- The full network path that includes the file name.
Errors
- InvalidDocumentTypeException
- The record ID is not that of a document type.
- PathNotFoundException
- The network path is not found.
- RecordDoesNotExistException
- The record does not exist.
- ContentException
- An error occurred with the stream or checksum.
- AccessException
- The user does not have access to read the record or write to the destination 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:uploadFrom>
<ws:contents>
<con:Content>
<con:content>cid:490195952411</con:content>
<con:path>\\networkFolder\Book1.txt</con:path>
<con:recordId>292814</con:recordId>
</con:Content>
</ws:contents>
</ws:uploadFrom>
</soapenv:Body>
</soapenv:Envelope>
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>
<uploadFromResponse xmlns="http://ws.tririga.com">
<reponses>
<ns1:Response xmlns:ns1="http://content.dto.ws.tririga.com">
<checksum xmlns="http://content.dto.ws.tririga.com">1294328364</checksum>
<content xsi:nil="true" xmlns="http://content.dto.ws.tririga.com"/>
<fieldName xsi:nil="true" xmlns="http://content.dto.ws.tririga.com"/>
<fileName xsi:nil="true" xmlns="http://content.dto.ws.tririga.com">Book1.txt</fileName>
<length xsi:nil="true" xmlns="http://content.dto.ws.tririga.com">9080</length>
<message xmlns="http://content.dto.ws.tririga.com"/>
<mimeType xsi:nil="true" xmlns="http://content.dto.ws.tririga.com">text/plain</mimeType>
<path xmlns="http://content.dto.ws.tririga.com">\\networkFolder\Book1.txt</path>
<recordId xmlns="http://content.dto.ws.tririga.com">292814</recordId>
<status xmlns="http://content.dto.ws.tririga.com">Success</status>
<updatedDate xmlns="http://content.dto.ws.tririga.com">04/15/2009 02:39:26 PM</updatedDate>
</ns1:Response>
</reponses>
</uploadFromResponse>
</soap:Body>
</soap:Envelope>