Skip to content

StorageObject->update() throws ConflictException when predefinedAcl option is provided #392

@marcinrosinski

Description

@marcinrosinski

To reproduce, invoke

$object->update([
'predefinedAcl' => 'publicRead'
]);

the following exception is being thrown:

Uncaught exception 'Google\Cloud\Exception\ConflictException' with message '{
 "error": {
  "errors": [
   {
    "domain": "global",
    "reason": "conflict",

    "message": "Cannot provide both a predefinedAcl and access controls."
   }

works fine under bucket->upload() e.g.

$bucket->upload(
 fopen($path, 'r'),[
'name' => 'file.txt',
'predefinedAcl' => 'publicRead'
]);

Metadata

Metadata

Assignees

Labels

🚨This issue needs some love.api: storageIssues related to the Cloud Storage API.triage meI really want to be triaged.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions