From 467c2932288514d7e1aa38cc7c8757f2ca6cc12e Mon Sep 17 00:00:00 2001 From: filesite Date: Wed, 2 Nov 2022 20:28:11 +0800 Subject: [PATCH] add config for api/config --- conf/app.php | 1 + controller/ApiController.php | 1 + 2 files changed, 2 insertions(+) diff --git a/conf/app.php b/conf/app.php index e74847d..a8fe328 100644 --- a/conf/app.php +++ b/conf/app.php @@ -63,6 +63,7 @@ $configs = array( 'password' => '88888888', 'captcha' => true, //后台登陆是否开启验证码 + 'maxUploadFileNumber' => 5, //一次批量上传文件数量 'maxUploadFileSize' => 20, //单位:Mb 'allowedUploadFileTypes' => array( 'image/jpeg', diff --git a/controller/ApiController.php b/controller/ApiController.php index fb772e3..ae80761 100644 --- a/controller/ApiController.php +++ b/controller/ApiController.php @@ -793,6 +793,7 @@ Class ApiController extends Controller { $data['admin_captcha'] = $configs['admin']['captcha']; $data['admin_maxUploadFileSize'] = $configs['admin']['maxUploadFileSize'] * 1024*1024; $data['admin_supportedFileTypes'] = $configs['admin']['allowedUploadFileTypes']; + $data['admin_maxUploadFileNumber'] = $configs['admin']['maxUploadFileNumber']; $code = 1; $msg = '';