diff --git a/src/Models/Media.php b/src/Models/Media.php index 480f74a3..1269b4e5 100644 --- a/src/Models/Media.php +++ b/src/Models/Media.php @@ -48,7 +48,7 @@ protected function url(): Attribute } catch (\Throwable) { // ACL not supported on Storage Bucket, Laravel only throws exception here so need to be careful. // so we assume it's private - $isPrivate = true; + $isPrivate = config(sprintf('filesystems.disks.%s.visibility', $this->disk)) !== 'public'; } return $isPrivate ? Storage::disk($this->disk)->temporaryUrl(