From 42c48ce1d64e941d28c7bfe4093f9659e77bd523 Mon Sep 17 00:00:00 2001 From: yn147 <2270338776@qq.com> Date: 星期四, 23 十一月 2023 20:23:37 +0800 Subject: [PATCH] 学籍,毕业,档案,考勤 --- src/main/java/com/qxueyou/scc/teach/res/service/impl/FileService.java | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/src/main/java/com/qxueyou/scc/teach/res/service/impl/FileService.java b/src/main/java/com/qxueyou/scc/teach/res/service/impl/FileService.java index e67a090..6f983cd 100644 --- a/src/main/java/com/qxueyou/scc/teach/res/service/impl/FileService.java +++ b/src/main/java/com/qxueyou/scc/teach/res/service/impl/FileService.java @@ -75,13 +75,17 @@ String destPath = getDestPath(name); String fullPath = config.getResRootPath() + "/" + destPath; + //鎴彇涓婁紶鍗庝负浜戠殑缂栫爜 File fileRoot = new File(fullPath.substring(0, fullPath.lastIndexOf("/"))); if (!fileRoot.exists()) { fileRoot.mkdirs(); } + + //鍘嬬缉 FileUtils.copyInputStreamToFile(in, new File(fullPath)); + //鍗庝负浜戠紪鐮佸瓨鍏ユ暟鎹簱 ResFile file = insertFileToDB(name, fullPath, destPath, getFileType(name)); return new Result(true, "success", -- Gitblit v1.8.0