【问题标题】:Viewing ACLs from S3 console从 S3 控制台查看 ACL
【发布时间】: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


    【解决方案1】:

    听起来它正在按预期工作。 AWSS3ObjectCannedACLPrivate 应该会提供具有完全访问权限且未添加其他受让人的帐户所有者。

    此外,借助 Amazon S3 Transfer Utility,您可以在 AWSS3TransferUtilityExpression 上使用 - setValue:forRequestParameter: 设置 ACL。

    【讨论】:

    • 感谢您的回复。没有意识到什么时候它被设置为私人它不会显示任何东西。也感谢您在设置 S3 Transfer Utility ACL 方面的帮助。
    猜你喜欢
    • 1970-01-01
    • 2013-10-28
    • 2017-11-17
    • 2012-12-19
    • 1970-01-01
    • 2014-08-03
    • 1970-01-01
    • 2016-10-02
    • 2018-08-22
    相关资源
    最近更新 更多