|
...
|
...
|
@@ -379,13 +379,25 @@ class ImageController extends Controller |
|
|
|
$max = config('upload.default_b_image')['size']['max'];
|
|
|
|
if(is_array($files)){
|
|
|
|
foreach ($files as $file){
|
|
|
|
if ($file->getSize() > $max) {
|
|
|
|
$this->response('图片最大为500K',Code::SYSTEM_ERROR);
|
|
|
|
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 ($files->getSize() > $max) {
|
|
|
|
$this->response('图片最大为500K',Code::SYSTEM_ERROR);
|
|
|
|
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'])){
|
...
|
...
|
|