Using AWS iOS SDK to fetch files from cloudfront distribuition

我的未来我决定 提交于 2019-12-19 09:20:50

问题


I am using the latest iOS SDK for AWS, and fetching files from S3 works fine using the TransferManager Class

S3GetObjectRequest *request = [[S3GetObjectRequest alloc] initWithKey:@"test.png" withBucket:@"my_bucket_name"];

S3TransferOperation * op = [self.tm download:request];

then I wanted to add Cloudfront for better edge serving, but setting the cloudfront distribution as the S3 bucket does not work..

S3GetObjectRequest *request = [[S3GetObjectRequest alloc] initWithKey:@"test.png" withBucket:@"dcn1i2k31v14q.cloudfront.net"];

S3TransferOperation * op = [self.tm download:request];

it was an accepted answer in this SO question

iOS AWS SDK and CloudFront - accessing images

I know I can get cloudfront files directly but I wanted to take advantage of the AWS SDK Transfer manager class queue and pause resume capabilities.

any ideas?

thank you


回答1:


I am one of the maintainers of the AWS SDK for iOS. The S3TransferManager is intended for use with Amazon S3, not Amazon CloudFront and as such has not been tested or validated for use with this service.

We'll investigate adding this functionality to a later release. Sorry for any inconvenience.



来源:https://stackoverflow.com/questions/20239687/using-aws-ios-sdk-to-fetch-files-from-cloudfront-distribuition

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!