|
|
@@ -776,36 +776,7 @@ class User extends BaseController
|
|
|
return ["code"=>1,"url"=>str_replace("\\", "/", $savePath)];
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-// public function index(Request $request){
|
|
|
-// $file =$request->file('file');
|
|
|
-// $isZ = $request->post('isz',1);
|
|
|
-// if(empty($file)) {
|
|
|
-// return app('json')->fail("未上传文件");
|
|
|
-// }
|
|
|
-// $rootTmp = config('filesystem.disks.local.root') .'/' . \think\facade\Filesystem::putFile( 'tmp', $file);
|
|
|
-// if($isZ == 1) {
|
|
|
-// $image_size = @getimagesize($rootTmp);
|
|
|
-// if ($image_size[0] > 1000) {
|
|
|
-// $imgS = Image::open($rootTmp);
|
|
|
-// $imgS->thumb(1000, $image_size[1]);
|
|
|
-// $imgS->save($rootTmp);
|
|
|
-// } else {
|
|
|
-// if ($image_size[1] > 1000) {
|
|
|
-// $imgS = Image::open($rootTmp);
|
|
|
-// $imgS->thumb($image_size[0], 1000);
|
|
|
-// $imgS->save($rootTmp);
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }
|
|
|
-// $qiniu = new Qiniu;
|
|
|
-// $img_url = $qiniu->updateFile('img', $rootTmp, $rootTmp);
|
|
|
-// if(empty($img_url['url'])){
|
|
|
-// return app('json')->fail( $qiniu->getError());
|
|
|
-// }
|
|
|
-//
|
|
|
-// return app('json')->success(['img'=>$img_url['url']]);
|
|
|
-// }
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* 七牛上传图片
|