Skip to content

Commit

Permalink
updated visibility check
Browse files Browse the repository at this point in the history
  • Loading branch information
imahmood committed Dec 31, 2023
1 parent 3773b18 commit 6fd55d3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Models/Media.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

namespace Imahmood\FileStorage\Models;

use Illuminate\Contracts\Filesystem\Filesystem;
use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
Expand Down Expand Up @@ -162,7 +163,7 @@ private function makeUrl(string $path): string
{
$visibility = config("filesystems.disks.{$this->disk}.visibility");

if ($visibility === 'public') {
if ($visibility === Filesystem::VISIBILITY_PUBLIC) {
return Storage::disk($this->disk)->url($path);
}

Expand Down

0 comments on commit 6fd55d3

Please sign in to comment.