Aliyun.OSS.阿里云OSS对象存储接口测试 C#.Winform (原)
Aliyun.OSS.阿里云OSS对象存储接口测试 C#.Winform (原)1. 首先在阿里云开通OSS服务,新建Bucket及AccessKey,得到accessKeyId及accessKeySecret。
2. 解决方案要加载NuGet程序包,搜索Aliyun.OSS.SDK及安装。
C# Code:
private void Form1_Load(object sender, EventArgs e)
{
string accessKeyId = "zLTAI6dmbcawzYpd=";
string accessKeySecret = "3qeQ7TqMEHIr9k1Apu76ljlLezxzB3 ";
string endpoint = "oss-cn-shenzhen.aliyuncs.com";
client = new OssClient(endpoint, accessKeyId, accessKeySecret);
}