保存进度!

This commit is contained in:
2025-10-16 15:40:25 +08:00
parent 74c4389c9f
commit bb25a5db61
2 changed files with 16 additions and 3 deletions

View File

@@ -1,3 +1,7 @@
# regulatory-management-system
# 产险厦门分公司规章制度管理工具
# 概述
产险厦门分公司规章制度管理工具。

View File

@@ -21,8 +21,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.bind.annotation.RequestMethod;
// @SuppressWarnings( "unused" )
@Controller
@@ -99,6 +97,17 @@ public class FileUpload
return result;
}
/**
* 接收上传文件,并保存到临时目录:
* 1、临时目录下再用sessionID作为子目录保存文件。
* 2、保存时不更改文件名会覆盖同名文件。
* 3、MultipartFile参数形参名称必须和请求form中file标签的name属性一致否则值为null。
* 4、返回值为接收结果和文件保存绝对路径。
* @param fileName
* @param file
* @param request
* @return
*/
@RequestMapping( path = "/file-upload.do" )
@ResponseBody
public FileUploadResult saveUploadFile(