【发布时间】:2015-09-11 08:19:52
【问题描述】:
我正在编写一个 iOS 应用程序,通过 S3 上传图像。我目前正在通过传输管理器使用预制 ACL 在图像上传上设置 ACL,如下面的代码所示。
//do the uploading using the AWS Transfer Manager so we can set the ACL
_uploadRequest = [AWSS3TransferManagerUploadRequest new];
_uploadRequest.bucket = @"miltest";
_uploadRequest.ACL = AWSS3ObjectCannedACLPrivate;
//key = the name of what the image is going to be called
_uploadRequest.key = fileName;
_uploadRequest.contentType = @"image.png";
_uploadRequest.body = url;
图片上传正常,但是当我查看对象的属性时,我没有看到此页面中指定的设置 ACL:http://docs.aws.amazon.com/AmazonS3/latest/dev/manage-acls-using-console.html。
我只能看到存储桶所有者的策略。任何想法为什么没有设置 uploadRequest ACL?
我还注意到,新的传输实用程序似乎不允许应用在上传对象时设置 ACL。是否移除了对 ACL 的支持?
【问题讨论】:
标签: ios amazon-web-services amazon-s3 acl access-control