diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/util/MsFileUtils.java b/backend/framework/sdk/src/main/java/io/metersphere/sdk/util/MsFileUtils.java index 71f2c0a7db..aa526bad54 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/util/MsFileUtils.java +++ b/backend/framework/sdk/src/main/java/io/metersphere/sdk/util/MsFileUtils.java @@ -51,7 +51,7 @@ public class MsFileUtils { if (file != null && file.getSize() > 0) { try (InputStream ins = file.getInputStream()) { validateFileName(file.getOriginalFilename()); - File toFile = new File(Objects.requireNonNull(file.getOriginalFilename())); + File toFile = new File(FileUtils.getTempDirectoryPath()+"/"+Objects.requireNonNull(file.getOriginalFilename())); inputStreamToFile(ins, toFile); return toFile; } catch (Exception e) {