public void ChgmTest() { Mac mac = new Mac(AccessKey, SecretKey); BucketManager target = new BucketManager(mac); HttpResult result = target.Chgm(Bucket1, FileKey1, "MimeType"); bool cond = (result.Code == (int)HttpCode.OK || result.Code == (int)HttpCode.BUCKET_NOT_EXIST || result.Code == (int)HttpCode.FILE_NOT_EXIST); Assert.IsTrue(cond); }
/// <summary> /// 修改文件的MIME_TYPE /// </summary> public static void chgm() { Mac mac = new Mac(Settings.AccessKey, Settings.SecretKey); string bucket = "test"; string key = "1.txt"; string mimeType = "text/html"; BucketManager bm = new BucketManager(mac); var result = bm.Chgm(bucket, key, mimeType); Console.WriteLine(result); }