自定義的服務(wù)實現(xiàn)亞馬遜AWS協(xié)議:
配置AWS方法
+(void)configAWS{
? ? AWSStaticCredentialsProvider *credentialsProvider = [[AWSStaticCredentialsProvider alloc] initWithAccessKey:AccessKey
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? secretKey:SecretKey];
? ? AWSEndpoint *endPoint = [[AWSEndpoint alloc] initWithRegion:AWSRegionUSEast1
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? service:AWSServiceS3
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? URL:[NSURLURLWithString:HOST]];
? ? AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? endpoint:endPoint
?? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? credentialsProvider:credentialsProvider];
? ? [AWSServiceManager defaultServiceManager].defaultServiceConfiguration = configuration;
}
實現(xiàn)上傳下載,大文件分片,斷點續(xù)傳的demo如下:
https://gitee.com/cuiyuanshou/AWS3_upload