CMISSetDocUploadType

Sets the type of the file that will be uploaded.

Member of namespace

CMISClient

Syntax

bool CMISSetDocUploadType(string cmisDocType)

Parameters

cmisDocType
Type: string

Parameters

cmisDocType : The document type of the uploaded file. Smart parameters are supported.

Returns

Always returns True.

Level

All levels.

Details

This action sets the CMIS document type for the file that will be subsequently uploaded in a following upload action. Use of this action is optional. If it is not called, the value of cmis:document is used. To set the document type, this action must be called before CMISUploadFile or CMISUploadPage.

Standard CMIS properties are of the form CMIS:xxx. By convention, custom CMIS properties should not use the CMIS: prefix. Calling this action with an empty string, will reset the value back to the default cmis:document type. Once the upload is complete, the document type is reset to the default value and this action will need to be called again to set a custom value for another upload.

If the specified upload type is invalid or not defined on your CMIS server, an error will occur in the upload action.

Example:
SetCMISDocUploadType("cmisbook:poem")
SetCMISDocUploadProperty("cmisbook:author", "Edgar Allan Poe")
SetCMISDocUploadProperty("cmisbook:poemtitle", "The Raven")
CMISUploadPage("MyFile.txt", "/MyCMISDir", "text/plain")           

This example uses a predefined custom document type and then sets the custom author and title properties of the uploaded file.