Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Google Cloud Storage] It should be possible not to use the visibility handler/visibility settings. #1356

Closed
jkuma opened this issue Sep 21, 2021 · 0 comments

Comments

@jkuma
Copy link
Contributor

jkuma commented Sep 21, 2021

Bug Report

Report of issue (https://github.com/thephpleague/flysystem-google-cloud-storage/issues/4) from thephpleague/flysystem-google-cloud-storage

Q A
BC Break no
Version 2.0.6

Summary

GCP storage buckets now suggest not to use ACL but bucket wide permissions when possible. Unfortunately trying to upload a file to such bucket throws an error:

Cannot insert legacy ACL for an object when uniform bucket-level access is enabled. Read more at https://cloud.google.com/storage/docs/uniform-bucket-level-access

That was a problem for me, I ended up making a copy of the adapter since it was unable to extend it and just commented out the following line:

'predefinedAcl' => $this->visibilityHandler->visibilityToPredefinedAcl($visibility),

it would be good to actually allow null $defaultVisibility, $dafaultAcl with null works when doing uploads.

How to reproduce

When using GoogleCloudStorage adapter and enabling uniform bucket-level access.

jkuma added a commit to jkuma/flysystem that referenced this issue Sep 21, 2021
@jkuma jkuma changed the title [Google Cloud Storage] Impossible to set an empty prefix. [Google Cloud Storage] It should be possible not to use the visibility handler/visibility settings. Sep 21, 2021
jkuma added a commit to jkuma/flysystem that referenced this issue Sep 21, 2021
frankdejonge pushed a commit that referenced this issue Sep 21, 2021
@jkuma jkuma closed this as completed Sep 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant