Skip to content

Commit

Permalink
Merge pull request #426 from Kovah/3.x
Browse files Browse the repository at this point in the history
Allow manual override of disk visibility in disk configuration
  • Loading branch information
awcodes authored Jan 29, 2024
2 parents 7e912e3 + 69648c5 commit 6aba446
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Models/Media.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 6aba446

Please sign in to comment.