awcodes / filament-curator

A media picker plugin for Filament Panels.
MIT License
343 stars 89 forks source link

Allow manual override of disk visibility in disk configuration #426

Closed Kovah closed 10 months ago

Kovah commented 10 months ago

In case the disk does not support visibility for single objects (Storage::disk($this->disk)->getVisibility($this->path)), Curator assumes that the disk must be private. In my case Cloudflare R2 supports S3, but not file-level visibility. Therefore Curator only generates those signed URLs with the endpoint URL instead of the public bucket URL from the config.

The new introduced logic checks if the disk config has the visibility set to 'public'. Otherwise it defaults to false. Works great for me, now the correct URL is generated for Media files.

awcodes commented 10 months ago

Thank you. 😀