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

Problem with Uniform bucket-level access URL generation #38

Closed aetonsi closed 2 years ago

aetonsi commented 2 years ago

Hello, i have a bucket with the following settings: image

So i set the visibility handler to NO_PREDEFINED_VISIBILITY, and i can upload my files.

However, when i try to generate a URL via Storage::url(), it is generated like this: /uploads/debug/3c45fa08-bebe-4f86-9185-764c7589c110.jpg, instead of https://storage.googleapis.com/my-bucket-name/uploads/debug/3c45fa08-bebe-4f86-9185-764c7589c110.jpg (which i think should be the default for the public visibility handler).

How can i generate a public URL correctly, if i have to set the visibility handler the NO_PREDEFINED_VISIBILITY?

As you can see from the screenshot "access control" (uniform) and "public access status" are two separate settings of the bucket, but it seems that at the moment they are mixed up together in the visibility setting. Is this an error?

Thank you for your time