feat: 上传路径调整
parent
fe2181cb8c
commit
64d426be51
|
@ -25,7 +25,7 @@ class Upload extends BaseController
|
|||
}
|
||||
$this->validate = new VUpload();
|
||||
$this->uploadPath = Config::get('filesystem.disks.local.url');
|
||||
if(is_writable(app()->getRootPath() . 'wwwroot' . $this->uploadPath)){
|
||||
if(is_writable(app()->getRootPath() . 'public' . $this->uploadPath)){
|
||||
$this->uploadPathIsWritable = 1;
|
||||
}
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ class Upload extends BaseController
|
|||
return $this->json(1, $errorMsg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//文件上传(通用)
|
||||
public function file()
|
||||
{
|
||||
|
@ -72,7 +72,7 @@ class Upload extends BaseController
|
|||
return $this->json(1, $errorMsg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//图片上传(通用)
|
||||
public function image()
|
||||
{
|
||||
|
@ -108,7 +108,7 @@ class Upload extends BaseController
|
|||
//富文本编辑器商城图片
|
||||
public function wangImage()
|
||||
{
|
||||
|
||||
|
||||
$imageArr = request()->file('wang_img'); // 该方式,前端js上传方法中字段名称必须以数组形式传参 如 wang_img[] = 值
|
||||
$errno = 0;
|
||||
$data = [];
|
||||
|
@ -133,7 +133,7 @@ class Upload extends BaseController
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$return['errno'] = $errno;
|
||||
$return['data'] = $data;
|
||||
return json($return);
|
||||
|
|
Loading…
Reference in New Issue