Cloud Storage Integrator - Online Help
Cloud Storage Integrator
Questions / Feedback?

UploadFile Method

Uploads a file.

Syntax

 char* UploadFile(char* lpszFileName);

Remarks

UploadFile uploads a file to the folder specified by ResourceParentId. If ResourceParentId is not specified the file will be uploaded to the root directory. This method returned the Id of the uploaded file. If the file already exists the server will return an error.

The FileName parameter specifies the name of the file. Naming restrictions:

  • Names must be 255 characters or less.
  • Names with non-printable ASCII are not supported.
  • Names with the characters "/", "\", or trailing whitespace are not supported.
  • The special names "." and ".." are not supported.

LocalFile specifies the file to upload. The data to upload may also be set in ResourceData or set by SetUploadStream. To encrypt a file set EncryptionAlgorithm and EncryptionPassword.

The following properties are applicable when calling UploadFile:


box.LocalFile = "../MyFile.zip";
box.UploadFile("MyFile.zip");

After uploading a file the Resource* properties are populated with information about the uploaded file.

 
 
Copyright (c) 2017 /n software inc. - All rights reserved.
Build 1.0.6240.0