static void Main(string[] args)
{
Qiniu.Conf.Config.Init();
//string bucketName = "123";
//PutPolicy put = new PutPolicy(bucketName);
//string uptoken = put.Token();
////Console.Write(uptoken);
PutFile("zcy123", "AA.png", "E:\\Web\\images\\AA.png");
}
/// <summary>
/// 上传文件测试
/// </summary>
/// <param name="bucket"></param>
/// <param name="key"></param>
/// <param name="fname"></param>
public static void PutFile(string bucket, string key, string fname)
{
var policy = new PutPolicy(bucket, 3600);
string upToken = policy.Token();
PutExtra extra = new PutExtra();
IOClient client = new IOClient();
client.PutFile(upToken, key, fname, extra);
}
?????.........