|
@@ -1090,6 +1090,9 @@ class Talent extends EnterpriseController {
|
|
$headimg = $request->file("photo");
|
|
$headimg = $request->file("photo");
|
|
$upload = new \app\common\api\UploadApi();
|
|
$upload = new \app\common\api\UploadApi();
|
|
$result = $upload->uploadOne($headimg, "image", "talent/photo");
|
|
$result = $upload->uploadOne($headimg, "image", "talent/photo");
|
|
|
|
+ if ($result->code == 500) {
|
|
|
|
+ throw new ValidateException($result->msg);
|
|
|
|
+ }
|
|
$file = imagecreatefromstring(file_get_contents("storage/" . $result->filepath));
|
|
$file = imagecreatefromstring(file_get_contents("storage/" . $result->filepath));
|
|
$width = imagesx($file);
|
|
$width = imagesx($file);
|
|
$height = imagesy($file);
|
|
$height = imagesy($file);
|
|
@@ -1240,6 +1243,9 @@ class Talent extends EnterpriseController {
|
|
$headimg = $request->file("photo");
|
|
$headimg = $request->file("photo");
|
|
$upload = new \app\common\api\UploadApi();
|
|
$upload = new \app\common\api\UploadApi();
|
|
$result = $upload->uploadOne($headimg, "image", "talent/photo");
|
|
$result = $upload->uploadOne($headimg, "image", "talent/photo");
|
|
|
|
+ if ($result->code == 500) {
|
|
|
|
+ throw new ValidateException($result->msg);
|
|
|
|
+ }
|
|
$file = imagecreatefromstring(file_get_contents("storage/" . $result->filepath));
|
|
$file = imagecreatefromstring(file_get_contents("storage/" . $result->filepath));
|
|
$width = imagesx($file);
|
|
$width = imagesx($file);
|
|
$height = imagesy($file);
|
|
$height = imagesy($file);
|
|
@@ -1381,6 +1387,9 @@ class Talent extends EnterpriseController {
|
|
$headimg = $request->file("photo");
|
|
$headimg = $request->file("photo");
|
|
$upload = new \app\common\api\UploadApi();
|
|
$upload = new \app\common\api\UploadApi();
|
|
$result = $upload->uploadOne($headimg, "image", "talent/photo");
|
|
$result = $upload->uploadOne($headimg, "image", "talent/photo");
|
|
|
|
+ if ($result->code == 500) {
|
|
|
|
+ throw new ValidateException($result->msg);
|
|
|
|
+ }
|
|
$file = imagecreatefromstring(file_get_contents("storage/" . $result->filepath));
|
|
$file = imagecreatefromstring(file_get_contents("storage/" . $result->filepath));
|
|
$width = imagesx($file);
|
|
$width = imagesx($file);
|
|
$height = imagesy($file);
|
|
$height = imagesy($file);
|