作者 lyh

gx

... ... @@ -379,15 +379,27 @@ class ImageController extends Controller
$max = config('upload.default_b_image')['size']['max'];
if(is_array($files)){
foreach ($files as $file){
if(isset($this->cache['image_max']) && ($this->cache['image_max'] != 0)){
if ($file->getSize() > $this->cache['image_max']) {
$this->response('图片最大为500K',Code::SYSTEM_ERROR);
}
}else{
if ($file->getSize() > $max) {
$this->response('图片最大为500K',Code::SYSTEM_ERROR);
}
}
}
}else{
if(isset($this->cache['image_max']) && ($this->cache['image_max'] != 0)){
if ($files->getSize() > $this->cache['image_max']) {
$this->response('图片最大为500K',Code::SYSTEM_ERROR);
}
}else{
if ($files->getSize() > $max) {
$this->response('图片最大为500K',Code::SYSTEM_ERROR);
}
}
}
if(!isset($this->param['upload_method'])){
//根据项目上传标识区分上传到cos/本地
$projectModel = new Project();
... ...