From 074bca1c9d043da1659680dcbdf9fcd757b411cb Mon Sep 17 00:00:00 2001 From: hdm Date: Mon, 20 Jun 2022 00:27:52 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E4=B8=8A=E4=BC=A0=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E9=BB=98=E8=AE=A4=E6=9C=80=E5=A4=A7=E5=80=BC=E4=B8=BA?= =?UTF-8?q?100M?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/controller/Index.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/app/api/controller/Index.php b/app/api/controller/Index.php index b8ed8cc..4e1f607 100644 --- a/app/api/controller/Index.php +++ b/app/api/controller/Index.php @@ -44,13 +44,14 @@ class Index extends BaseController $sha1 = $file->hash('sha1'); $md5 = $file->hash('md5'); $rule = [ - 'image' => 'jpg,png,jpeg,gif', - 'doc' => 'doc,docx,ppt,pptx,xls,xlsx,pdf', - 'file' => 'zip,gz,7z,rar,tar', - ]; - $fileExt = $rule['image'] . ',' . $rule['doc'] . ',' . $rule['file']; - //1M=1024*1024=1048576字节 - $fileSize = 2 * 1024 * 1024; + 'image' => 'jpg,png,jpeg,gif', + 'doc' => 'txt,doc,docx,ppt,pptx,xls,xlsx,pdf', + 'file' => 'zip,gz,7z,rar,tar', + 'video' => 'mpg,mp4,mpeg,avi,wmv,mov,flv,m4v', + ]; + $fileExt = $rule['image'] . ',' . $rule['doc'] . ',' . $rule['file'] . ',' . $rule['video']; + //1M=1024*1024=1048576字节 + $fileSize = 100 * 1024 * 1024; if (isset($param['type']) && $param['type']) { $fileExt = $rule[$param['type']]; }