All Products
Search
Document Center

Object Storage Service:OSS SDK for C#

Last Updated:Dec 04, 2024

Object Storage Service (OSS) SDK for C# supports .NET Framework 2.0 and later. This topic is written based on OSS SDK for C# 2.8.0.

Compatibility

  • For SDKs 2.x.x:

    • API operations: compatible

    • Namespace: compatible

  • For SDKs 1.0.x:

    • API operations: compatible

    • Namespace: incompatible. Aliyun.OpenServices.OpenStorageService is changed to Aliyun.OSS.

Source code and API documents

For more information about SDK source code, visit GitHub. For more information, see API Doc.

Sample code

OSS SDK for C# provides various sample code. You can obtain the sample code from GitHub. The following table describes the sample code files.

Sample code file

Content

PutObjectSample.cs

Overview

AppendObjectSample.cs

Append upload

DoesObjectExistSample.cs

Determine whether an object exists

DeleteObjectsSample.cs

Delete objects

CopyObjectSample.cs

Copy objects

ModifyObjectMetaSample.cs

Manage object metadata

MultipartUploadSample.cs

Multipart upload

ResumableSample.cs

Resumable upload

GetObjectSample.cs

Overview

GetObjectByRangeSample.cs

Range download

GetObjectAclSample.cs

Manage object ACLs

SetObjectAclSample.cs

Manage object ACLs

ListObjectsSample.cs

List objects

UrlSignatureSample.cs

Authorize access

UploadCallbackSample.cs

Upload callbacks

ProgressSample.cs

Upload progress bar and Download progress bar

CNameSample.cs

Use a custom domain name to access OSS

PostPolicySample.cs

PostObject

CreateBucketSample.cs

Create buckets

DeleteBucketSample.cs

Delete buckets

DoesBucketExistSample.cs

Determine whether a bucket exists

ListBucketsSample.cs

List buckets

SetBucketAclSample.cs

Manage bucket ACLs

SetBucketLifecycleSample.cs

Lifecycle rules

SetBucketLoggingSample.cs

Logging

SetBucketRefererSample.cs

Hotlink protection

SetBucketWetbsiteSample.cs

Static website hosting

SetBucketCorsSample.cs

CORS

ImageProcessSample.cs

IMG

References