如题,给客户二开的pro版本的使用的是华为云储存,图片上传正常,视频上传报错

经过排查发现是官方少写了华为云的视频封面图,补写之后上传正常

修复方法:
crmeb\services\upload\storage\Obs.php打开这个文件拉倒底部增加如下代码,切记最后一个花括号}
public function videoCoverImage(string $filePath = '', string $type = 'all', int $time = 1)
{
$data = ['big' => $filePath, 'mid' => $filePath, 'small' => $filePath];
$this->fileInfo->filePathBig = $this->fileInfo->filePathMid = $this->fileInfo->filePathSmall = $this->fileInfo->filePathWater = $filePath;
if ($filePath) {
// 华为云OBS视频截图处理
//来自九华山九爻定制开发 vx:jiu91369
foreach ($this->thumb as $v) {
if ($type == 'all' || $type == $v) {
$height = 300;
$width = 400;
$key = 'filePath' . ucfirst($v);
$this->fileInfo->$key = $filePath . '?x-image-process=video/snapshot,t_' . ($time * 1000) . ',f_jpg,w_' . $width . ',h_' . $height;
$data[$v] = $this->fileInfo->$key;
}
}
}
return $data;
}
