更新:文件上传最大执行时长修改为30秒内

master
zwesy 2020-12-18 17:19:24 +08:00
parent 99c065b27a
commit 5d1ad23b45
1 changed files with 7 additions and 3 deletions

View File

@ -17,6 +17,9 @@ class Upload extends BaseController
public function __construct() public function __construct()
{ {
ini_set("memory_limit",-1);
set_time_limit(30); // 默认限制30秒
$system = System::getSystem(); $system = System::getSystem();
if (!empty($system)) { if (!empty($system)) {
$this->isCompress = $system['compress']??true; $this->isCompress = $system['compress']??true;
@ -98,7 +101,9 @@ class Upload extends BaseController
} }
return $this->json(0, 'ok', $return); return $this->json(0, 'ok', $return);
}else{ }else{
var_dump('xxximg');
$errorMsg = Lang::get($this->validate->getError()); $errorMsg = Lang::get($this->validate->getError());
var_dump('xxximg2');
return $this->json(1, $errorMsg); return $this->json(1, $errorMsg);
} }
} }
@ -106,7 +111,6 @@ class Upload extends BaseController
//富文本编辑器商城图片 //富文本编辑器商城图片
public function wangImage() public function wangImage()
{ {
$imageArr = request()->file('wang_img'); // 该方式前端js上传方法中字段名称必须以数组形式传参 如 wang_img[] = 值 $imageArr = request()->file('wang_img'); // 该方式前端js上传方法中字段名称必须以数组形式传参 如 wang_img[] = 值
$errno = 0; $errno = 0;
$data = []; $data = [];