fix: 图片上传命名问题
This commit is contained in:
@@ -71,7 +71,7 @@ class Upload
|
|||||||
// 转换为webp格式
|
// 转换为webp格式
|
||||||
$webp = $image->toWebp(75);
|
$webp = $image->toWebp(75);
|
||||||
$root = config('filesystem.disks.image.root');
|
$root = config('filesystem.disks.image.root');
|
||||||
$filename = $param['module'] . '/' . ($name_rule() ?? date('Ymd') . '/' . md5((string)time()) . '.webp');
|
$filename = $param['module'] . '/' . ($name_rule() ? $name_rule()() : date('Ymd') . '/' . md5((string)time() . random_str(8))) . '.webp';
|
||||||
$webp->save($this->checkPath($root . '/' . $filename));
|
$webp->save($this->checkPath($root . '/' . $filename));
|
||||||
// 获取webp文件大小
|
// 获取webp文件大小
|
||||||
$file_size = $webp->size();
|
$file_size = $webp->size();
|
||||||
|
|||||||
Reference in New Issue
Block a user