|
...
|
...
|
@@ -514,22 +514,22 @@ class ImageController extends Controller |
|
|
|
foreach ($files as $file){
|
|
|
|
if(isset($this->cache['image_max']) && ($this->cache['image_max'] != 0)){
|
|
|
|
if ($file->getSize() > $this->cache['image_max'] * 1024) {
|
|
|
|
$this->response('图片最大为'.$this->cache['image_max'],Code::SYSTEM_ERROR);
|
|
|
|
$this->response('图片最大为'.$this->cache['image_max'].'k',Code::SYSTEM_ERROR);
|
|
|
|
}
|
|
|
|
}else{
|
|
|
|
if ($file->getSize() > $max) {
|
|
|
|
$this->response('图片最大为1024K',Code::SYSTEM_ERROR);
|
|
|
|
$this->response('图片最大为2m',Code::SYSTEM_ERROR);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}else{
|
|
|
|
if(isset($this->cache['image_max']) && ($this->cache['image_max'] != 0)){
|
|
|
|
if ($files->getSize() > $this->cache['image_max'] * 1024) {
|
|
|
|
$this->response('图片最大为'.$this->cache['image_max'],Code::SYSTEM_ERROR);
|
|
|
|
$this->response('图片最大为'.$this->cache['image_max'].'k',Code::SYSTEM_ERROR);
|
|
|
|
}
|
|
|
|
}else{
|
|
|
|
if ($files->getSize() > $max) {
|
|
|
|
$this->response('图片最大为1024K',Code::SYSTEM_ERROR);
|
|
|
|
$this->response('图片最大为2m',Code::SYSTEM_ERROR);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
...
|
...
|
|