自定义的服务实现亚马逊AWS协议:
配置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;
}
实现上传下载,大文件分片,断点续传的demo如下:
https://gitee.com/cuiyuanshou/AWS3_upload
网友评论