Updated on 2023-03-16 GMT+08:00

Uploading an Object

Sample code:

PutObjectRequest request = new PutObjectRequest
{
    BucketName = "bucketname",
    ObjectKey = "objectname",
    InputStream = new MemoryStream(Encoding.UTF8.GetBytes("Hello OBS"))
};
client.PutObject(request);

For more information, see Object Upload Overview.