diff --git a/app/controller/api/Common.php b/app/controller/api/Common.php index 9ff9ec33..74237ba3 100644 --- a/app/controller/api/Common.php +++ b/app/controller/api/Common.php @@ -161,8 +161,8 @@ class Common extends BaseController $file = is_array($file) ? $file[0] : $file; validate(["$field|图片" => [ 'fileSize' => config('upload.filesize'), - 'fileExt' => 'jpg,jpeg,png,bmp,gif', - 'fileMime' => 'image/jpeg,image/png,image/gif,application/octet-stream' + 'fileExt' => config('upload.fileExt'), + // 'fileMime' => 'image/jpeg,image/png,image/gif,application/octet-stream,application/vnd.android.package-archive' ]])->check([$field => $file]); $upload = UploadService::create(); $info = $upload->to('def')->move($field); diff --git a/app/controller/api/store/product/StoreMicro.php b/app/controller/api/store/product/StoreMicro.php index bba75b8c..9317e787 100644 --- a/app/controller/api/store/product/StoreMicro.php +++ b/app/controller/api/store/product/StoreMicro.php @@ -69,6 +69,7 @@ class StoreMicro extends BaseController //提交导入商品id public function ProductImport(){ + return app('json')->fail('该接口已废弃'); $id = $this->request->param('id', 0); $price = $this->request->param('price', 0); $stock = $this->request->param('stock', 0); diff --git a/config/upload.php b/config/upload.php index 19b46541..e1f5a6ce 100644 --- a/config/upload.php +++ b/config/upload.php @@ -19,7 +19,7 @@ return [ //上传文件大小 'filesize' => 52428800, //上传文件后缀类型 - 'fileExt' => ['jpg', 'jpeg', 'png', 'gif', 'pem', 'mp3', 'wma', 'wav', 'amr', 'mp4', 'key', 'xlsx', 'xls', 'ico', 'apk', 'ipa'], + 'fileExt' => ['jpg', 'jpeg', 'png', 'gif', 'pem', 'mp3', 'wma', 'wav', 'amr', 'mp4', 'key', 'xlsx', 'xls', 'ico', 'apk', 'ipa','wgt'], //上传文件类型 'fileMime' => ['image/jpeg', 'image/gif', 'image/png', 'text/plain', 'audio/mpeg', 'image/vnd.microsoft.icon'], //驱动模式