取消文件上传大小限制

This commit is contained in:
unknown 2023-10-08 15:22:08 +08:00
parent 376c4c4d01
commit 3b72cefd38

View File

@ -19,10 +19,6 @@ class alioss
if(!in_array($fileType,$ext)){
return ['code'=>0,'msg'=>'图片格式错误'];
}
//验证图片大小
if($fileSize > 500*1024){
return ['code'=>0,'msg'=>'图片大小错误'];
}
try {
//实例化对象 将配置传入
$ossClient = new OssClient($this->accessKeyId, $this->accessKeySecret, $this->endpoint);
@ -44,11 +40,7 @@ class alioss
//验证视频类型
$ext = ['mp4','avi','flv','wmv','swf'];
if(!in_array($fileType,$ext)){
return ['code'=>0,'msg'=>'图片格式错误'];
}
//验证视频大小
if($fileSize > 1024*1024*100){
return ['code'=>0,'msg'=>'图片大小错误'];
return ['code'=>0,'msg'=>'视频格式错误'];
}
try {
//实例化对象 将配置传入