|
@@ -216,8 +216,8 @@ public class IgnoreController {
|
|
|
* @param file 文件
|
|
|
* @return :
|
|
|
*/
|
|
|
+ @SysLog("无需登录文件上传")
|
|
|
@PostMapping("/files/upload")
|
|
|
- @SneakyThrows
|
|
|
public R doUpload(@RequestParam("file") MultipartFile file) {
|
|
|
if (file.isEmpty()) {
|
|
|
return R.error("请选择一个上传文件");
|
|
@@ -254,7 +254,7 @@ public class IgnoreController {
|
|
|
FileUtils.uploadFile(file.getBytes(), filePath, fileFullName);
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
- throw new Exception("上传文件失败:" + e.getMessage());
|
|
|
+ return R.error("上传文件失败:" + e.getMessage());
|
|
|
}
|
|
|
}
|
|
|
return R.success(fileVO, "上传成功");
|