|
...
|
...
|
@@ -258,11 +258,7 @@ class ImageController extends Controller |
|
|
|
*/
|
|
|
|
public function onlyName($enName,$project_id){
|
|
|
|
$imageModel = new ImageModel();
|
|
|
|
if(empty($project_id)){
|
|
|
|
$info = $imageModel->read(['en_name' => $enName]);
|
|
|
|
}else{
|
|
|
|
$info = $imageModel->read(['project_id' => $project_id, 'en_name' => $enName]);
|
|
|
|
}
|
|
|
|
if($info !== false){
|
|
|
|
return true;
|
|
|
|
}
|
|
...
|
...
|
@@ -290,6 +286,9 @@ class ImageController extends Controller |
|
|
|
* @time :2023/7/19 16:38
|
|
|
|
*/
|
|
|
|
public function saveMysql(&$imageModel,$size,$image_type,$fileName,$hash,$is_cos = 0,$mime = '', $name=''){
|
|
|
|
if(strpos($mime, 'image') !== false){
|
|
|
|
|
|
|
|
}
|
|
|
|
$data = [
|
|
|
|
'path' => $this->path.'/'.$fileName,
|
|
|
|
'created_at' => date('Y-m-d H:i:s',time()),
|
|
...
|
...
|
@@ -514,6 +513,9 @@ class ImageController extends Controller |
|
|
|
//A端上传
|
|
|
|
if(isset($this->param['refer_type']) && $this->param['refer_type'] == 1){
|
|
|
|
$this->path = $this->uploads['path_a'].'/'.$this->image_type[$this->param['refer']].'/'.date('Y-m');
|
|
|
|
if(isset($this->cache['project_id']) && !empty($this->cache['project_id'])){
|
|
|
|
$this->path = $this->path.'/'.$this->cache['project_id'];
|
|
|
|
}
|
|
|
|
}else{
|
|
|
|
//TODO::设置上传文件大小(B端上传)
|
|
|
|
$max = config('upload.default_b_image')['size']['max'];
|
...
|
...
|
|