|
|
|
@ -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<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 {
|
|
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|