正在显示
1 个修改的文件
包含
2 行增加
和
2 行删除
| @@ -380,7 +380,7 @@ class ImageController extends Controller | @@ -380,7 +380,7 @@ class ImageController extends Controller | ||
| 380 | if(is_array($files)){ | 380 | if(is_array($files)){ |
| 381 | foreach ($files as $file){ | 381 | foreach ($files as $file){ |
| 382 | if(isset($this->cache['image_max']) && ($this->cache['image_max'] != 0)){ | 382 | if(isset($this->cache['image_max']) && ($this->cache['image_max'] != 0)){ |
| 383 | - if ($file->getSize() > $this->cache['image_max']) { | 383 | + if ($file->getSize() > $this->cache['image_max'] * 1024) { |
| 384 | $this->response('图片最大为1024K',Code::SYSTEM_ERROR); | 384 | $this->response('图片最大为1024K',Code::SYSTEM_ERROR); |
| 385 | } | 385 | } |
| 386 | }else{ | 386 | }else{ |
| @@ -391,7 +391,7 @@ class ImageController extends Controller | @@ -391,7 +391,7 @@ class ImageController extends Controller | ||
| 391 | } | 391 | } |
| 392 | }else{ | 392 | }else{ |
| 393 | if(isset($this->cache['image_max']) && ($this->cache['image_max'] != 0)){ | 393 | if(isset($this->cache['image_max']) && ($this->cache['image_max'] != 0)){ |
| 394 | - if ($files->getSize() > $this->cache['image_max']) { | 394 | + if ($files->getSize() > $this->cache['image_max'] * 1024) { |
| 395 | $this->response('图片最大为1024K',Code::SYSTEM_ERROR); | 395 | $this->response('图片最大为1024K',Code::SYSTEM_ERROR); |
| 396 | } | 396 | } |
| 397 | }else{ | 397 | }else{ |
-
请 注册 或 登录 后发表评论