add(req-2080):断点续传--修改临时文件路径

This commit is contained in:
胡朝飞 2024-01-16 18:02:52 +08:00
parent 0e610437fd
commit 8c4e29dbff

View File

@ -639,9 +639,9 @@ public class FileServiceImpl implements FileService {
try {
input = file.getInputStream();
// 指定目标文件路径及文件名
String targetDir = "target/";
String rootDir = System.getProperty("user.dir");
String fileName = file.getOriginalFilename();
String filePath = targetDir + fileName;
String filePath = rootDir + "/" + fileName;
// 创建输出流并写入数据
OutputStream output = new FileOutputStream(filePath);