1.添加头像上传接口

This commit is contained in:
2025-08-07 15:39:58 +08:00
parent 2cfadf96dd
commit 51b9180316
9 changed files with 132 additions and 5 deletions

View File

@@ -0,0 +1,31 @@
package vvpkassistant.file.controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import vvpkassistant.Data.ResponseData;
import vvpkassistant.file.service.FileService;
import javax.annotation.Resource;
/*
* @author: ziin
* @date: 2025/8/7 13:58
*/
@RestController
@RequestMapping("file")
public class FileController {
@Resource
private FileService fileService;
@PostMapping("/uploadHeadIcon")
public ResponseData<Object> uploadHeadIcon(@RequestParam("file") MultipartFile file) {
return ResponseData.success(fileService.uploadHeadIcon(file));
}
}