UploadDocument

Upload a document to a specified folder

This method uploads a document to the specified folder.

Please note that the root document folder ID is 0.

SOAP action: http://apiconnector.com/v2/ApiService/UploadDocument

πŸ“˜

Input and output parameters

The input and output parameters for this method are:

Input parameters

  • Data - required; file
  • Folder ID - required; integer
  • FileName - required; string

Output parameters

  • UploadDocumentResult
    • Document
      • Id - integer
      • Name - string
      • FileName - string
      • FileSize - integer
      • DateCreated - dateTime
      • DateModified - dateTime

Example

using (var client = new ApiServiceClient())
{
	client.ClientCredentials.UserName.UserName = "username";
	client.ClientCredentials.UserName.Password = "password";

	var path = "document.pdf";
	var data = File.ReadAllBytes(path);
	var folderId = 1;
	var fileName = "TestFile";
	var uploadedDocument = client.UploadDocument(folderId, fileName, data);
}