@PostMapping("/api/upload")
@ResponseBody
public BaseDTO<String> uploadFile(@RequestParam("file") MultipartFile uploadFile) throws IOException {
try {
if (uploadFile.isEmpty()) {
return "文件上传失败";
} else {
String fileName = uploadFile.getName();
String originFileName = uploadFile.getOriginalFilename();
InputStream inputStream = uploadFile.getInputStream();
return "文件上传成功";
}
} catch (Exception e) {
}
}