作者 lyh

gx

... ... @@ -179,8 +179,6 @@ class FileController
$url = $this->config['root'].$this->path;
$fileName = uniqid().rand(10000,99999).'.'.$files->getClientOriginalExtension();
//同步数据到cos
var_dump($this->upload_location);
die();
if($this->upload_location == 1){
$cosService = new CosService();
$cosService->uploadFile($files,$this->path,$fileName);
... ... @@ -334,6 +332,8 @@ class FileController
//根据项目上传标识区分上传到cos/本地
$projectModel = new Project();
$project_info = $projectModel->read(['id'=>$this->cache['project_id']],['upload_location']);
var_dump($project_info);
die();
$this->upload_location = $project_info['upload_location'];
}
$this->path = $this->uploads['path_b'].'/'.$this->cache['project_id'].'/'.$this->file_type[$this->param['refer']].'/'.date('Y-m');
... ...