better handling of storage exists

This commit is contained in:
2023-09-29 12:16:43 +10:00
parent 30d39c5326
commit 32a08e1e10

View File

@@ -1009,7 +1009,11 @@ class Media extends Model
$storage = 'private';
}
} else {
if(Storage::has($storage) === false) {
try {
if(Storage::disk($storage)->exists('') === false) {
return Media::STORAGE_NOT_FOUND;
}
} catch(\Exception $e) {
return Media::STORAGE_NOT_FOUND;
}