更新:文件上传最大执行时长修改为30秒内
parent
99c065b27a
commit
5d1ad23b45
|
@ -17,6 +17,9 @@ class Upload extends BaseController
|
|||
|
||||
public function __construct()
|
||||
{
|
||||
ini_set("memory_limit",-1);
|
||||
set_time_limit(30); // 默认限制30秒
|
||||
|
||||
$system = System::getSystem();
|
||||
if (!empty($system)) {
|
||||
$this->isCompress = $system['compress']??true;
|
||||
|
@ -73,8 +76,8 @@ class Upload extends BaseController
|
|||
|
||||
//图片上传(通用)
|
||||
public function image()
|
||||
{
|
||||
$image = request()->file('image');
|
||||
{
|
||||
$image = request()->file('image');
|
||||
if($this->validate->checkImage($image)){
|
||||
try{
|
||||
if(!$this->uploadPathIsWritable){
|
||||
|
@ -98,7 +101,9 @@ class Upload extends BaseController
|
|||
}
|
||||
return $this->json(0, 'ok', $return);
|
||||
}else{
|
||||
var_dump('xxximg');
|
||||
$errorMsg = Lang::get($this->validate->getError());
|
||||
var_dump('xxximg2');
|
||||
return $this->json(1, $errorMsg);
|
||||
}
|
||||
}
|
||||
|
@ -106,7 +111,6 @@ class Upload extends BaseController
|
|||
//富文本编辑器商城图片
|
||||
public function wangImage()
|
||||
{
|
||||
|
||||
$imageArr = request()->file('wang_img'); // 该方式,前端js上传方法中字段名称必须以数组形式传参 如 wang_img[] = 值
|
||||
$errno = 0;
|
||||
$data = [];
|
||||
|
|
Loading…
Reference in New Issue