diff --git a/README.md b/README.md index a32f0fc..bc9213e 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,7 @@ -# regulatory-management-system +# 产险厦门分公司规章制度管理工具 + + + +# 概述 产险厦门分公司规章制度管理工具。 \ No newline at end of file diff --git a/code/backend/RegulatoryManagementBackend/src/main/java/com/cpic/xim/web/controllers/fileupload/FileUpload.java b/code/backend/RegulatoryManagementBackend/src/main/java/com/cpic/xim/web/controllers/fileupload/FileUpload.java index ff0b413..460bd5a 100644 --- a/code/backend/RegulatoryManagementBackend/src/main/java/com/cpic/xim/web/controllers/fileupload/FileUpload.java +++ b/code/backend/RegulatoryManagementBackend/src/main/java/com/cpic/xim/web/controllers/fileupload/FileUpload.java @@ -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(