|
...
|
...
|
@@ -23,7 +23,7 @@ class FileController |
|
|
|
public $token = '';//token
|
|
|
|
|
|
|
|
public $cache = '';//缓存数据
|
|
|
|
public $upload_location = 0;
|
|
|
|
public $upload_location = 1;
|
|
|
|
public $file_type = [
|
|
|
|
2 => 'other',//其他
|
|
|
|
1 => 'video',//视频
|
|
...
|
...
|
@@ -265,8 +265,8 @@ class FileController |
|
|
|
//根据项目上传标识区分上传到cos/本地
|
|
|
|
$projectModel = new Project();
|
|
|
|
$project_info = $projectModel->read(['id' => $this->cache['project_id']], ['project_location']);
|
|
|
|
if ($project_info['project_location'] == 0) {//通项目时 上传到cos
|
|
|
|
$this->upload_location = 1;//1:上传到本地
|
|
|
|
if ($project_info['project_location'] != 0) {//通项目时 上传到cos
|
|
|
|
$this->upload_location = 0;//1:上传到本地
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$this->path = $this->uploads['path_b'].'/'.$this->cache['project_id'].'/'.$this->file_type[$this->param['refer']].'/'.date('Y-m');
|
...
|
...
|
|