update
This commit is contained in:
@@ -45,7 +45,12 @@ class CatchUpload
|
||||
*/
|
||||
protected $path = '';
|
||||
|
||||
/**
|
||||
public function __construct()
|
||||
{
|
||||
$this->initDriver();
|
||||
}
|
||||
|
||||
/**
|
||||
* upload files
|
||||
*
|
||||
* @param UploadedFile $file
|
||||
@@ -77,6 +82,13 @@ class CatchUpload
|
||||
throw new FailedException('Upload Failed, Try Again!');
|
||||
}
|
||||
|
||||
/**
|
||||
* 本地路径
|
||||
*
|
||||
* @time 2020年09月07日
|
||||
* @param $path
|
||||
* @return string
|
||||
*/
|
||||
protected function getLocalPath($path)
|
||||
{
|
||||
if ($this->getDriver() === self::LOCAL) {
|
||||
@@ -296,6 +308,21 @@ class CatchUpload
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化
|
||||
*
|
||||
* @time 2020年09月07日
|
||||
* @return $this
|
||||
*/
|
||||
protected function initDriver()
|
||||
{
|
||||
if ($driver = Utils::config('site.upload')) {
|
||||
$this->driver = $driver;
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取云存储的域名
|
||||
*
|
||||
|
Reference in New Issue
Block a user