🐛 修复 BUG
This commit is contained in:
@@ -78,7 +78,7 @@ class Image extends Model
|
||||
if (! $this->strategy) {
|
||||
return Storage::disk('uploads')->url($this->pathname);
|
||||
}
|
||||
$domain = Str::replaceFirst('/', '', $this->strategy->configs->get('domain'));
|
||||
$domain = rtrim($this->strategy->configs->get('domain'), '/');
|
||||
return $domain.'/'.$this->pathname;
|
||||
}
|
||||
|
||||
|
||||
@@ -167,7 +167,7 @@ class UploadService
|
||||
protected function getAdapter(int $disk, Collection $configs): AdapterInterface
|
||||
{
|
||||
return match ($disk) {
|
||||
StrategyKey::Local => new Local($configs->get('root')),
|
||||
StrategyKey::Local => new Local($configs->get('root') ?: config('filesystems.disks.uploads.root')),
|
||||
StrategyKey::Kodo => new QiniuAdapter(
|
||||
accessKey: $configs->get(KodoOption::AccessKey),
|
||||
secretKey: $configs->get(KodoOption::SecretKey),
|
||||
|
||||
Reference in New Issue
Block a user