Skip to content

Storage example should show how to set ACL #1012

Closed
@volgin

Description

@volgin

ACLs are not even mentioned in the examples. Example needs to show both how to set a specific ACL and how to set a PredefinedAcl.

When I use this this code, the console Cloud Storage viewer does not show items as shared publicly:

storage.create(coverBlob, coverImage,
    BlobTargetOption.predefinedAcl(PredefinedAcl.PUBLIC_READ));

So it's not clear what this code is supposed to do.

Am I right to assume that ACL should be set on BlobInfo like this?

    .acl(Arrays.asList(Acl.of(User.ofAllUsers(), Role.READER)))

If this is correct, is it enough, or should be used together with BlobTargetOption.predefinedAcl(PredefinedAcl.PUBLIC_READ)?

Metadata

Metadata

Assignees

Labels

api: storageIssues related to the Cloud Storage API.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions