fixed:修复oss上传
This commit is contained in:
parent
22a8574824
commit
65d3111e65
@ -336,11 +336,27 @@ class CatchUpload
|
|||||||
case CatchUpload::LOCAL:
|
case CatchUpload::LOCAL:
|
||||||
return $driver['domain'];
|
return $driver['domain'];
|
||||||
case CatchUpload::OSS:
|
case CatchUpload::OSS:
|
||||||
return $driver['end_point'];
|
return self::getOssDomain();
|
||||||
case CatchUpload::QCLOUD:
|
case CatchUpload::QCLOUD:
|
||||||
return $driver['cdn'];
|
return $driver['cdn'];
|
||||||
default:
|
default:
|
||||||
throw new FailedException(sprintf('Driver [%s] Not Supported.', $driver));
|
throw new FailedException(sprintf('Driver [%s] Not Supported.', $driver));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取 OSS Domain
|
||||||
|
*
|
||||||
|
* @time 2021年01月20日
|
||||||
|
* @return mixed|string
|
||||||
|
*/
|
||||||
|
protected static function getOssDomain(): string
|
||||||
|
{
|
||||||
|
$oss = \config('filesystem.disks.oss');
|
||||||
|
if ($oss['is_cname'] === false) {
|
||||||
|
return 'https://' . $oss['bucket'] . '.' . $oss['end_point'];
|
||||||
|
}
|
||||||
|
|
||||||
|
return $oss['end_point'];
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user