作者 李宇航

合并分支 'master-server' 到 'master'

base64流文件转链接



查看合并请求 !861
... ... @@ -109,7 +109,7 @@ class HandleNewsText extends Command
$this->uploads = config('upload.default_image');
$path = $this->uploads['path_b'].'/'.($this->project_id).'/image_news/'.date('Y-m');
$cosService = new CosService();
$fileName = md5(uniqid() . '_' . time() . '.' . ($this->user['project_id'] ?? 1618).rand(1,10000)) . '.' .$type;
$fileName = md5(uniqid() . '_' . time() . '.' . ($this->project_id).rand(1,10000)) . '.' .$type;
return getImageUrl($cosService->uploadFile($files,$path,$fileName));
}
}
... ...
... ... @@ -254,9 +254,9 @@ class NewsLogic extends BaseLogic
*/
public function manager_uploads($files,$type = 'png'){
$this->uploads = config('upload.default_image');
$path = $this->uploads['path_b'].'/'.($this->user['project_id'] ?? 1618).'/image_news/'.date('Y-m');
$path = $this->uploads['path_b'].'/'.($this->user['project_id']).'/image_news/'.date('Y-m');
$cosService = new CosService();
$fileName = md5(uniqid() . '_' . time() . '.' . ($this->user['project_id'] ?? 1618).rand(1,10000)) . '.' .$type;
$fileName = md5(uniqid() . '_' . time() . '.' . ($this->user['project_id']).rand(1,10000)) . '.' .$type;
return getImageUrl($cosService->uploadFile($files,$path,$fileName));
}
/**
... ...