You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I work with Google Storage API via java and I use 0.9.4-alpha(before was 0.9.2-alpha ) version. When I create a blob, I use this code and it works correctly, I get different access levels for a new blob:
but I need to have an opportunity of changing an access to particular files. Well, I have supposed that it seems like this, because I didn't find any examples and information in the documentation:
but this piece of code throws an exception: com.google.cloud.storage.StorageException: Cannot provide both a predefinedAcl and access controls. and I get a message:
{
"code" : 409,
"errors" : [ {
"domain" : "global",
"message" : "Cannot provide both a predefinedAcl and access controls.",
"reason" : "conflict"
} ],
"message" : "Cannot provide both a predefinedAcl and access controls."
}
It seems to me it's weird because I can pass Storage.BlobTargetOption.predefinedAcl in update method, but it doesn't work(perhaps I have not to pass predefinedAcl there ...??).
Also I have tried to change an access via com.google.cloud.storage.Acl class but I got another exception.
I suppose I do something wrong and it isn't a bug, but stackoverflow didn't help me and absence of examples is really problem for me now. I should be grateful you for help.
Activity
dev-priporov commentedon Mar 9, 2017
well, I found a solution:
But I think it's not as obvious as it can
chore: Update generation configuration at Wed Oct 23 02:23:51 UTC 2024 (
chore(deps): update dependency com.google.cloud:google-cloud-datastor…
chore(deps): update dependency ch.qos.logback:logback-core to v1.5.18 (…
chore: Update generation configuration at Wed Oct 23 02:23:51 UTC 2024 (
chore(deps): update dependency ch.qos.logback:logback-core to v1.5.18 (…
deps: update dependency com.fasterxml.jackson.core:jackson-databind t…
deps: update dependency com.google.apis:google-api-services-storage t…
deps: update dependency com.google.apis:google-api-services-storage t…
deps: update dependency org.graalvm.buildtools:native-maven-plugin to…
chore(main): release 1.133.0 (#2206)
deps: update dependency org.graalvm.buildtools:native-maven-plugin to…
chore(main): release 1.133.0 (#2206)
docs: make delete examples consistent with other languages (googleapi…
chore(main): release 2.20.4 (googleapis#1701)