AliyunOSSiOSTests/OSSObjectTests.m [1855:1883]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                                                 withObjectKey:objectKey
                                                    httpMethod:method
                                        withExpirationInterval:30 * 60
                                                withParameters:@{}
                                                   contentType:contentType
                                                    contentMd5:contentMd5];

    NSString *url = task.result;

    NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString:url]];
    request.HTTPMethod = method;
    [request setValue:contentType forHTTPHeaderField:OSSHttpHeaderContentType];
    [request setValue:contentMd5 forHTTPHeaderField:OSSHttpHeaderContentMD5];
    NSURLSession *session = [NSURLSession sharedSession];
    OSSTaskCompletionSource * tcs = [OSSTaskCompletionSource taskCompletionSource];
    NSURLSessionTask *sesstionTask = [session uploadTaskWithRequest:request fromFile:[NSURL fileURLWithPath:filePath] completionHandler:^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error) {
        NSHTTPURLResponse *httpResoponse = (NSHTTPURLResponse *)response;
        if (!error && httpResoponse.statusCode == 200) {
            NSLog(@"上传成功");
            [tcs setError:error];
        } else {
            NSLog(@"上传失败 \n%@ \n%@", error, [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]);
            [tcs setResult:data];
        }
    }];
    [sesstionTask resume];
    [tcs.task waitUntilFinished];
    
    BOOL isEqual = [self checkMd5WithBucketName:_privateBucketName
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



AliyunOSSiOSTests/OSSObjectTests.m [2114:2142]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                                                withObjectKey:objectKey
                                                   httpMethod:method
                                       withExpirationInterval:30 * 60
                                               withParameters:@{}
                                                  contentType:contentType
                                                   contentMd5:contentMd5];

    NSString *url = task.result;

    NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString:url]];
    request.HTTPMethod = method;
    [request setValue:contentType forHTTPHeaderField:OSSHttpHeaderContentType];
    [request setValue:contentMd5 forHTTPHeaderField:OSSHttpHeaderContentMD5];
    NSURLSession *session = [NSURLSession sharedSession];
    OSSTaskCompletionSource * tcs = [OSSTaskCompletionSource taskCompletionSource];
    NSURLSessionTask *sesstionTask = [session uploadTaskWithRequest:request fromFile:[NSURL fileURLWithPath:filePath] completionHandler:^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error) {
        NSHTTPURLResponse *httpResoponse = (NSHTTPURLResponse *)response;
        if (!error && httpResoponse.statusCode == 200) {
            NSLog(@"上传成功");
            [tcs setError:error];
        } else {
            NSLog(@"上传失败 \n%@ \n%@", error, [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]);
            [tcs setResult:data];
        }
    }];
    [sesstionTask resume];
    [tcs.task waitUntilFinished];
    
    BOOL isEqual = [self checkMd5WithBucketName:_privateBucketName
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



