IPWorks Cloud 2020 C++ Edition

Questions / Feedback?

StartMultipartUpload Method

Starts a new multipart upload.

Syntax

ANSI (Cross Platform)
char* StartMultipartUpload(const char* lpszBucketId, const char* lpszFileName);

Unicode (Windows)
LPWSTR StartMultipartUpload(LPCWSTR lpszBucketId, LPCWSTR lpszFileName);
- (NSString*)startMultipartUpload:(NSString*)bucketId :(NSString*)fileName;
#define MID_BACKBLAZEB2_STARTMULTIPARTUPLOAD 33

IPWORKSCLOUD_EXTERNAL int IPWORKSCLOUD_CALL IPWorksCloud_BackblazeB2_Do(void *lpObj, int methid, int cparam, void *param[], int cbparam[], int64 *lpllVal);

Remarks

This method starts a new multipart upload for a file named FileName in the bucket specified by BucketId, and returns the Id of the newly-created multipart upload. This Id can then be used to call the following methods:

FileName is subject to the same restrictions described in the UploadFile method's documentation; refer to it for more information. If a file named FileName already exists in the destination bucket, a new version of it is created.

The following information is also included in the request, and will be applied to the final file when the multipart upload is completed with CompleteMultipartUpload:

  • All metadata items present in the Metadata* properties. Keep in mind that the server enforces a limit of 10 metadata items per file.
  • If the ClientModifiedTime configuration setting is non-empty: an additional metadata item with its value (which does count towards the 10 item limit).
  • The value of the ContentType property.

Multipart uploads never expire, they must be explicitly completed or aborted using CompleteMultipartUpload or AbortMultipartUpload. The ListMultipartUploads method can be used to retrieve a list of current multipart uploads.

The currently-authenticated application key must have the writeFiles capability to call this method successfully, otherwise the server will return an error. Refer to the AccountCapabilities property for more information.

Error Handling (C++)

This method returns a String value; after it returns, call the GetLastErrorCode() method to obtain its result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks Cloud 2020 C++ Edition - Version 20.0 [Build 8265]