From 9f1c440ab710b6e07cfad90eb3190c42e9b474a8 Mon Sep 17 00:00:00 2001 From: yaooo <272523191@qq.com> Date: Thu, 19 Oct 2023 18:08:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0ocr=E8=AF=86=E5=88=AB?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/controller/XunFeiController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/api/controller/XunFeiController.php b/app/api/controller/XunFeiController.php index 01d0a19bf..aaeafe4d9 100644 --- a/app/api/controller/XunFeiController.php +++ b/app/api/controller/XunFeiController.php @@ -392,8 +392,8 @@ class XunFeiController extends BaseApiController if ($filesize > 4 * 1024 * 1024) { return $this->fail('图片文件不能超过4M'); } - $ext = pathinfo($file, PATHINFO_EXTENSION); */ + $ext = pathinfo($file, PATHINFO_EXTENSION); $base64_image = base64_encode(file_get_contents($file)); $ocr = new OcrClient($this->app_id, $this->api_key, $this->api_secret); $ocrHostUrl = $ocr->assembleAuthUrl($ocrHostUrl);