up userimg Size
This commit is contained in:
parent
e8e5da04b0
commit
ae208be1d0
@ -94,7 +94,7 @@ class User extends BaseController
|
|||||||
{
|
{
|
||||||
$file = request()->file('file');
|
$file = request()->file('file');
|
||||||
try {
|
try {
|
||||||
validate(['file'=>'filesize:204800|fileExt:jpg,png,gif'])
|
validate(['file'=>'fileSize:204800|fileExt:jpg,png,gif'])
|
||||||
->check(['file'=>$file]);
|
->check(['file'=>$file]);
|
||||||
$savename = \think\facade\Filesystem::disk('public')->putFile('head_pic',$file);
|
$savename = \think\facade\Filesystem::disk('public')->putFile('head_pic',$file);
|
||||||
} catch (think\exception\ValidateException $e) {
|
} catch (think\exception\ValidateException $e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user