ios - 如何检查 S3 存储桶中的文件可用性

标签 ios objective-c amazon-web-services

我已将 aws v1 sdk 集成到我的 ios 应用程序中,以使用 NSURLSession 在后台模式下将视频上传到 S3 存储桶

但现在我想在开始上传之前检查存储桶中的文件可用性

为此,我设法获得了 V2 sdk 的链接 How can I check the existence of a key/file on an Amazon S3 Bucket using AWS iOS SDK v2?

V1 中使用的链接是什么??

最佳答案

适用于 iOS 的 AWS 开发工具包现已折旧;所以我相信文档链接也一定已被删除。

Version 1 of the AWS Mobile SDK is deprecated as of September 29, 2014 and will continue to be available until December 31, 2014. If you are building new apps, we recommend you use Version 2. If you are working on existing apps that use Version 1 (1.7.x or lower) of the AWS Mobile SDK, you can download v1 for Android here and iOS here. The API reference guides are included in the respective downloads. Apps built using Version 1 will continue to function after December 31, 2014. However, we highly recommend that you update your apps to the latest version so you can take advantage of the latest features and bug fixes. Source : http://aws.amazon.com/mobile/sdk/

我设法从 AWS 移动博客找到示例代码 [ http://mobile.awsblog.com/post/Tx15F6J3B8B4YKK/Creating-Mobile-Apps-with-Dynamic-Content-Stored-in-Amazon-S3]要获取 S3 对象,您可以从那里推断。

-(void)getRemoteImage:(AmazonS3Client*)s3
             withName:(NSString*)imageName
           fromBucket:(NSString*)bucketName
{
    S3GetObjectRequest *request = 
       [[S3GetObjectRequest alloc] initWithKey:imageName withBucket:bucketName];
    S3GetObjectResponse *response = [s3 getObject:request];

    [self storeImageLocally:response.body withName:imageName];
}

v1 iOS SDK 下载链接:http://sdk-for-ios.amazonwebservices.com/aws-ios-sdk-1.7.1.zip

关于ios - 如何检查 S3 存储桶中的文件可用性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28578079/

相关文章:

ios - UITableviewController 与可编辑 UIWebView 的 contentInset 混淆

ios - 我怎样才能让这个GIF正确显示?

database - AWS Aurora for PostgreSQL 在 ca-central-1 区域不可用吗?

amazon-web-services - 如何使用boto获取实例监控类型(基本与详细)?

ios - 使用选定的文件在 iOS 中创建静态库

ios - Swift AVAudioEngine AVAudioPCMBuffer 到 PowerLevel

ios - NSString initWithContentsOfURL 问题

ruby-on-rails - 我可以将 Web 服务器和应用程序服务器部署到同一个 AWS EC2 实例吗?

ios - RenderInContext 在 iOS7 上非常慢

ios - 如何检测页面 View Controller 上的滑动?