作者 刘锟

Merge remote-tracking branch 'origin/master' into akun

... ... @@ -380,23 +380,23 @@ class ImageController extends Controller
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);
if ($file->getSize() > $this->cache['image_max'] * 1024) {
$this->response('图片最大为1024K',Code::SYSTEM_ERROR);
}
}else{
if ($file->getSize() > $max) {
$this->response('图片最大为500K',Code::SYSTEM_ERROR);
$this->response('图片最大为1024K',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);
if ($files->getSize() > $this->cache['image_max'] * 1024) {
$this->response('图片最大为1024K',Code::SYSTEM_ERROR);
}
}else{
if ($files->getSize() > $max) {
$this->response('图片最大为500K',Code::SYSTEM_ERROR);
$this->response('图片最大为1024K',Code::SYSTEM_ERROR);
}
}
}
... ...