1.add image path to frontend

main
Gary 10 months ago
parent a971d104fc
commit e7875cbda6

@ -132,7 +132,7 @@ public class MyController extends BaseController{
@ApiOperation(value = "3.上传个人头像", notes = "图片压缩为70X70 JPEG存入S3桶为indie目录为 user/avatar/") @ApiOperation(value = "3.上传个人头像", notes = "图片压缩为70X70 JPEG存入S3桶为indie目录为 user/avatar/")
@PostMapping("/uploadAvatar") @PostMapping("/uploadAvatar")
@GlobalInterceptor(checkLogin = true) @GlobalInterceptor(checkLogin = true)
public Result<Void> uploadAvatar(@RequestHeader(value = "token", required = false) String token, public Result<String> uploadAvatar(@RequestHeader(value = "token", required = false) String token,
@VerifyParam(required = true) MultipartFile file) throws IOException { @VerifyParam(required = true) MultipartFile file) throws IOException {
UserLoginDto userLoginDto = getUserLoginDto(token); UserLoginDto userLoginDto = getUserLoginDto(token);
@ -145,6 +145,6 @@ public class MyController extends BaseController{
user.setAvatar(filePath); user.setAvatar(filePath);
userInfoService.update(user); userInfoService.update(user);
return Result.success(); return Result.success(filePath);
} }
} }

Loading…
Cancel
Save