How do you upload a file to the Oracle Bare Metal Cloud Object store using C#

How do you access the Oracle Object store in the Oracle Bare Metal Cloud using c#. I am looking to run the similar code below in c# within a .NET program:

static IAmazonS3 client;
using (client = new AmazonS3Client(Amazon.RegionEndpoint.USEast1)) 
{
GetObjectRequest request = new GetObjectRequest 
{
    BucketName = bucketName,
    Key = keyName
};

using (GetObjectResponse response = client.GetObject(request))  
{
    string dest = 
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Desktop), 
keyName);
    if (!File.Exists(dest))
    {
        response.WriteResponseStreamToFile(dest);
    }
}
}

Upvotes: 2

Views: 471

Answers (1)

Joe
Joe

Reputation: 2540

Please take a look here for a sample on how to talk to Oracle Bare Metal Cloud Services REST API from C#. This sample can be modified pretty easily to talk to the Object Storage service instead.

Upvotes: 2

Related Questions