【发布时间】:2015-06-03 19:21:46
【问题描述】:
我目前正在将图像从 IOS 应用程序上传到 AWS S3。
为了显示上传到 S3 的图像,我使用了文档中的方法
// Construct the NSURL for the download location.
NSString *downloadingFilePath = [NSTemporaryDirectory() stringByAppendingPathComponent:@"downloaded-myImage.jpg"];
NSURL *downloadingFileURL = [NSURL fileURLWithPath:downloadingFilePath];
// Construct the download request.
AWSS3TransferManagerDownloadRequest *downloadRequest = [AWSS3TransferManagerDownloadRequest new];
downloadRequest.bucket = @"myBucket";
downloadRequest.key = @"myImage.jpg";
downloadRequest.downloadingFileURL = downloadingFileURL;
然后用方法下载图片
[[transferManager download:downloadRequest] continueWithExecutor:[BFExecutor mainThreadExecutor]
withBlock:^id(BFTask *task)
我担心下载位置:如果下载的图像过多,会不会出现内存问题?
如果有人已经在使用这个框架,是否有任何缓存功能可以手动设置?使用像 SDWebImage 这样的框架来显示图像有什么好处吗?
【问题讨论】:
标签: ios amazon-web-services amazon-s3 sdwebimage