From dcf35f711e4b9f4bfbd1b55ca729fb3f46c49df6 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 11:42:49 +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---=E5=8A=A0=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/cn/axzo/oss/service/impl/FileServiceImpl.java | 7 +++++-- 1 file changed, 5 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 a3ea080..539ce53 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,9 +643,11 @@ public class FileServiceImpl implements FileService { input = file.getInputStream(); // 指定目标文件路径及文件名 String rootDir = System.getProperty("user.dir"); + log.info("rootDir,{}", rootDir); String fileName = file.getOriginalFilename(); - String filePath = rootDir + SEPARATOR + "temp_directory" + SEPARATOR; - String absolutePath = filePath + fileName; + String filePath = rootDir + SEPARATOR + "temp_directory"; + log.info("filePath,{}", filePath); + String absolutePath = filePath + SEPARATOR + fileName; // 创建临时文件夹 java.io.File tempDirectory = new java.io.File(filePath); @@ -660,6 +662,7 @@ public class FileServiceImpl implements FileService { absolutePath = rootDir + SEPARATOR + fileName; } } + log.info("tempDirectory,{}", tempDirectory); if (!tempDirectory.exists()) { // 兜底 absolutePath = rootDir + SEPARATOR + fileName;