This document is written based on C++ SDK V1.2.0.

SDK source code

For the SDK source code, see GitHub.

Sample code

The OSS C++ SDK provides a variety of sample code for your reference or use. The following table describes the content in the sample code.

Sample file Content
PutObjectFromFile Upload objects
GetObjectToFile Download objects
AppendObject Append upload
MultipartUploadObject Multipart upload
HeadObject Manage Object Meta
ListObjects List objects
CopyObject Copy an object
DeleteObject Delete an object
PutObjectProgress View upload progress
DownloadObjectProcess View download progress
RestoreArchiveObject Restore an archive object
BucketSample.cc Set static website hosting, CORS, lifecycle, access logging, and authorized access for a bucket, as shown in Static website hosting, CORS, Lifecycle, Access logging, and Authorized access.