diff --git a/app/api/controller/XunFeiController.php b/app/api/controller/XunFeiController.php index 88a4be3b3..de7ecc47f 100644 --- a/app/api/controller/XunFeiController.php +++ b/app/api/controller/XunFeiController.php @@ -126,13 +126,13 @@ class XunFeiController extends BaseApiController header('X-Accel-Buffering: no'); $file = request()->file('audio'); if(empty($file)){ - //return $this->fail('未上传音频文件'); + return $this->fail('未上传音频文件'); } // 上传音频临时文件 $savename = \think\facade\Filesystem::putFile('audio', $file); $file = app()->getRootPath() . '/runtime/storage/' . $savename; if (!file_exists($file)) { - //return $this->fail('未上传音频文件'); + return $this->fail('未上传音频文件'); } // $file = "https://lihai001.oss-cn-chengdu.aliyuncs.com/media/iat_mp3_16k.mp3"; $audioFile = fopen($file, 'rb');