spatie / laravel-google-cloud-storage

Google Cloud Storage filesystem driver for Laravel
https://spatie.be/open-source
MIT License
196 stars 51 forks source link

Use uniform visibility handler when specify no predefined visibility #55

Closed rwinzhang closed 1 year ago

rwinzhang commented 1 year ago

Depends on https://github.com/thephpleague/flysystem/pull/1629

Note: need to update composer.json file after above PR merged

freekmurze commented 1 year ago

Note: need to update composer.json file after above PR merged

Could you already make the needed changes in this PR?

rwinzhang commented 1 year ago

I haven't. I will update it after this PR https://github.com/thephpleague/flysystem/pull/1629 is merged and release with tagged version

AlexVanderbist commented 1 year ago

Hey there, the default PortableVisibilityHandler that we're currently using also supports the NO_PREDEFINED_VISIBILITY option (https://github.com/thephpleague/flysystem-google-cloud-storage/blob/3.x/PortableVisibilityHandler.php#L55). It should be enough to add the NO_PREDEFINED_VISIBILITY option to the array of accepted visibility options in this package to get this to work. I'll send a separate PR.

rwinzhang commented 1 year ago

It also need to pass UniformBucketLevelAccessVisibility too. I also add getClient public method like the s3 driver

AlexVanderbist commented 1 year ago

I think the default PortableVisibilityHandler already provides a way to avoid the error when visibility = NO_PREDEFINED_VISIBILITY. I'll merge this PR but make some changes to keep the default visibility handler. I'll also make sure that the visibility handler is configurable for when https://github.com/thephpleague/flysystem/pull/1629 eventually gets merged.

Thanks for the PR!