update:新增本地上传方法
This commit is contained in:
parent
566514f729
commit
ba1595f75f
@ -84,6 +84,21 @@ class CatchUpload
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传到 Local
|
||||
*
|
||||
* @time 2021年04月21日
|
||||
* @param $file
|
||||
* @return string
|
||||
*/
|
||||
public function toLocal($file): string
|
||||
{
|
||||
$path = Filesystem::disk(self::LOCAL)->putFile($this->getPath(), $file);
|
||||
|
||||
return public_path() . $this->getLocalPath($path);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 本地路径
|
||||
*
|
||||
@ -91,7 +106,7 @@ class CatchUpload
|
||||
* @param $path
|
||||
* @return string
|
||||
*/
|
||||
protected function getLocalPath($path)
|
||||
protected function getLocalPath($path): string
|
||||
{
|
||||
if ($this->getDriver() === self::LOCAL) {
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user