更新ocr识别接口

This commit is contained in:
yaooo 2023-10-19 18:08:14 +08:00
parent d5c109e0a4
commit 9f1c440ab7

View File

@ -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);