diff --git a/app/controller/Upload.php b/app/controller/Upload.php index d52e4de8..2d3d4642 100644 --- a/app/controller/Upload.php +++ b/app/controller/Upload.php @@ -82,7 +82,7 @@ class Upload extends Base { public function upload(){ $type = $this->request->param('type'); - $upload_type = (false !== strpos("image", $type)) ? "image" : 'file'; + $upload_type = (false !== strpos($type, "image")) ? "image" : 'file'; $config = $this->$upload_type(); // 获取表单上传文件 例如上传了001.jpg $file = $this->request->file('file');