From f451640b997c24b212117bf75b041ac049edcf2c Mon Sep 17 00:00:00 2001 From: wangxiaowei Date: Wed, 21 Aug 2024 11:07:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=AC=E5=9C=B0=E7=94=9F=E6=B4=BB=E5=95=86?= =?UTF-8?q?=E5=93=81=E5=9B=BE=E7=89=87=E4=B8=8A=E4=BC=A0=E5=88=B0=E9=98=BF?= =?UTF-8?q?=E9=87=8C=E4=BA=91OSS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/controller/File.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/api/controller/File.php b/app/api/controller/File.php index 534f573c..af6ead9d 100755 --- a/app/api/controller/File.php +++ b/app/api/controller/File.php @@ -62,7 +62,8 @@ class File extends Api { try{ $post = $this->request->post(); - if (is_array(self::$APP_UPLOAD_PATH[$post['type']])) { + + if (isset(self::$APP_UPLOAD_PATH[$post['type']])) { $path = self::$APP_UPLOAD_PATH[$post['type']]; // 本地生活商家上传商品 if ($post['type'] === 'local_shop_add' && $post['lstore_id'] > 0) { @@ -70,11 +71,8 @@ class File extends Api } else { return JsonServer::error('缺少参数'); } - dump($path); - dump($post);die; $result = UploadAliOSS::uploadImage($path); - dump($result);die; if ($result['code'] == 1) { return JsonServer::success('上传成功', $result['data']); }