From a10a32c45e5482caed911d1e66ca2b22b22e8ea3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=83=A1=E6=9C=9D=E9=A3=9E?= Date: Mon, 22 Jan 2024 12:06:52 +0800 Subject: [PATCH] =?UTF-8?q?add(req-2080):=E5=88=9B=E5=BB=BA=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=A4=B9---=E4=BF=AE=E6=94=B9=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/cn/axzo/oss/service/impl/FileServiceImpl.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/oss-service/src/main/java/cn/axzo/oss/service/impl/FileServiceImpl.java b/oss-service/src/main/java/cn/axzo/oss/service/impl/FileServiceImpl.java index 2d0518c..190be6e 100644 --- a/oss-service/src/main/java/cn/axzo/oss/service/impl/FileServiceImpl.java +++ b/oss-service/src/main/java/cn/axzo/oss/service/impl/FileServiceImpl.java @@ -643,8 +643,8 @@ public class FileServiceImpl implements FileService { input = file.getInputStream(); // 指定目标文件路径及文件名 String rootDir = System.getProperty("user.dir"); - log.info("rootDir,{}", rootDir); String fileName = file.getOriginalFilename(); + /*log.info("rootDir,{}", rootDir); String filePath = rootDir + SEPARATOR + "temp_directory"; log.info("filePath,{}", filePath); String absolutePath = filePath + SEPARATOR + fileName; @@ -666,7 +666,9 @@ public class FileServiceImpl implements FileService { if (tempDirectory.exists()) { // 兜底 absolutePath = tempDirectory + SEPARATOR + fileName; - } + }*/ + + String absolutePath = rootDir + SEPARATOR + fileName; log.info("临时文件夹,{}", absolutePath); // 创建输出流并写入数据