更新ocr识别接口
This commit is contained in:
parent
d5c109e0a4
commit
9f1c440ab7
@ -392,8 +392,8 @@ class XunFeiController extends BaseApiController
|
|||||||
if ($filesize > 4 * 1024 * 1024) {
|
if ($filesize > 4 * 1024 * 1024) {
|
||||||
return $this->fail('图片文件不能超过4M');
|
return $this->fail('图片文件不能超过4M');
|
||||||
}
|
}
|
||||||
$ext = pathinfo($file, PATHINFO_EXTENSION);
|
|
||||||
*/
|
*/
|
||||||
|
$ext = pathinfo($file, PATHINFO_EXTENSION);
|
||||||
$base64_image = base64_encode(file_get_contents($file));
|
$base64_image = base64_encode(file_get_contents($file));
|
||||||
$ocr = new OcrClient($this->app_id, $this->api_key, $this->api_secret);
|
$ocr = new OcrClient($this->app_id, $this->api_key, $this->api_secret);
|
||||||
$ocrHostUrl = $ocr->assembleAuthUrl($ocrHostUrl);
|
$ocrHostUrl = $ocr->assembleAuthUrl($ocrHostUrl);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user