32 lines
842 B
Java
32 lines
842 B
Java
package vvpkassistant.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));
|
|
}
|
|
|
|
}
|