🐛 修复 BUG

This commit is contained in:
WispX
2021-12-17 16:09:48 +08:00
parent 9ee8d51852
commit 2019fb86b7
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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;
}
+1 -1
View File
@@ -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),