头像上传,VUE3后端界面中使用的是request.upload,对应的方法是post

头像上传,VUE3后端界面中使用的是request.upload,对应的方法是post

Signed-off-by: 让无线电飞BG8GLR <atuchina@sina.com>
pull/35/head
让无线电飞BG8GLR 2023-06-01 04:58:32 +00:00 committed by Gitee
parent 5f8129d65b
commit 0ef82437ca
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 1 additions and 1 deletions

View File

@ -96,7 +96,7 @@ public class UserProfileController {
return success(true); return success(true);
} }
@PutMapping("/update-avatar") @PostMapping("/update-avatar")
@Operation(summary = "上传用户个人头像") @Operation(summary = "上传用户个人头像")
public CommonResult<String> updateUserAvatar(@RequestParam("avatarFile") MultipartFile file) throws Exception { public CommonResult<String> updateUserAvatar(@RequestParam("avatarFile") MultipartFile file) throws Exception {
if (file.isEmpty()) { if (file.isEmpty()) {