...
Content Upload methods use a separate SOAP endpoint from all other Web API methods. To upload a file, the client must first call StartFileUpload(), then call AppendChunk() one or more times, then call CompleteFileUpload(). It is also possible to upload multiple associated webpage asset files using a session token provided by the StartWebPageUploadSession() method. The workflow for uploading webpage assets is outlined in the following section.
...
- [string] uploadToken: The token of an upload that was initialized by the StartWebPageUploadSession() method. This parameter is only specified if the file being uploaded is a webpage file.
- [string] sessionToken: The token of an upload session initialized by the StartWebPageUploadSession() method. This parameter enables uploading of files related to a webpage file; it should only be specified if a webpage file or associated asset file is being uploaded.
- [string] filename: The name of the file to be uploaded. A descriptive error will be returned if any of the following conditions occur:
- This string is empty.
- The string has more than 128 characters.
- The file name is not valid.
- [long] filesize: The size of the file in bytes. This parameter must be an unsigned integer value no greater than 5000000000 (i.e. 5GB). A descriptive error will be returned if the value is negative.
- [int] chunksCount: The number of chunks the file consists of (starting at 1). The optimal chunk size is 256KiB. Files that are larger than this chunk size must be split into smaller parts by the client. Multiple chunks should be uploaded using multiple AppendChunk() calls specifying the same upload token.
- [enum: Auto, Image, Video, Audio, Webpage] contentType: The type of the content file. The default type is “Image”.
- [DateTime] fileLastModifiedDate: A value representing the last time the associated file was modified on the user storage (e.g. the "Date modified" value in Windows). This value can also be initialized later by modifying the Content entity.
- [string] virtualPath: The path in the BSN Library to which the file should be uploaded (the default is “\Shared\Incoming\”). If the path does not exist, it will be created. It must also contain leading and trailing slashes and be no longer than 128 characters.
- [base64Binary] fileThumb: The optional thumbnail data as a binary attachment. This parameter will be generated by the server if it is not specified.
- [string] sha1Hash: The SHA1 hash of the current file. The server performs verification of the uploaded file using the specified hash. A descriptive error will be returned if the specified hash does not match the hash value calculated by the server. This parameter is optional; the server-side hash verification process is skipped if this parameter is not specified.
...
- [string] uploadToken: The token of the upload that was initialized by the StartFileUpload() method. A descriptive error is returned if the string value is empty or not specified.
- [string] sessionToken: The token of the upload session initialized by the StartWebPageUpload() method. This token should only be provided if the client is uploading a set of webpage assets.
- [string] filename: The name of the uploaded file. A descriptive error will be returned if any of the following conditions occur:
- This string is empty.
- The string has more than 128 characters.
- The file name is not valid.
- [long] filesize: The size of the video file in bytes. This parameter must be an unsigned integer value no greater than 5000000000 (i.e. 5GB). A descriptive error will be returned if the value is negative.
- [int] chunksCount: The number of chunks the file consists of (starting at 1). The optimal chunk size is 256KiB. Files that are larger than this chunk size must be split into smaller parts by the client. Multiple chunks should be uploaded using multiple AppendChunk() calls specifying the same upload token.
- [string] sha1Hash: The SHA1 hash of the current file. The server performs verification of the uploaded file using the specified hash. A descriptive error will be returned if the specified hash does not match the hash value calculated by the server. This parameter is optional; the server-side hash verification process is skipped if this parameter is not specified.
- [enum: Auto, Image, Video, Audio, Webpage] contentType: The type of the content file. The default type is Image.
- [DateTime] fileLastModifiedDate: A value representing the last time the associated file was modified on the user storage (e.g. the "Date modified" value in Windows). This value can also be initialized later by modifying the Content entity.
- [string] virtualPath: The path in the BSN Library to which the file should be uploaded (the default is “\Shared\Incoming\”). If the path does not exist, it will be created. It must also contain leading and trailing slashes and be no longer than 128 characters.
- [base64Binary] fileThumb: The optional thumbnail data as a binary attachment. This parameter will be generated by the server if it is not specified.
...
WebPageUploadStatus CompleteWebPageUploadSession(array webpageAssets[], string sessionToken, string filename, long filesize, int chunksCount, enum ContentType, string virtualPath, base64Binary fileThumb, string sha1Hash)
Returns the Web Page ID of the uploaded webpage file if the upload session is successful. Otherwise, it returns a descriptive error. If a specified parameter is different between the StartWebPageUploadSession() and CompleteWebPageUploadSession() calls, the specification in the CompleteWebPageUploadSession() call will overwrite the original StartWebPageUploadSession() specification. This is true for both the webpage file and associated asset files.
...