From e7875cbda60037be2330ade2efd684a14c144331 Mon Sep 17 00:00:00 2001 From: Gary Date: Wed, 24 Jan 2024 11:25:08 +0800 Subject: [PATCH] 1.add image path to frontend --- .../src/main/java/com/luoo/user/controller/MyController.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/luoo_user/src/main/java/com/luoo/user/controller/MyController.java b/luoo_user/src/main/java/com/luoo/user/controller/MyController.java index 8b761a9..0eae87f 100644 --- a/luoo_user/src/main/java/com/luoo/user/controller/MyController.java +++ b/luoo_user/src/main/java/com/luoo/user/controller/MyController.java @@ -132,7 +132,7 @@ public class MyController extends BaseController{ @ApiOperation(value = "3.上传个人头像", notes = "图片压缩为70X70 JPEG,存入S3,桶为indie,目录为 user/avatar/") @PostMapping("/uploadAvatar") @GlobalInterceptor(checkLogin = true) - public Result uploadAvatar(@RequestHeader(value = "token", required = false) String token, + public Result uploadAvatar(@RequestHeader(value = "token", required = false) String token, @VerifyParam(required = true) MultipartFile file) throws IOException { UserLoginDto userLoginDto = getUserLoginDto(token); @@ -145,6 +145,6 @@ public class MyController extends BaseController{ user.setAvatar(filePath); userInfoService.update(user); - return Result.success(); + return Result.success(filePath); } }