修复Window下上传文件出现FileNotFoundException异常的问题

This commit is contained in:
网游之鱼 2022-01-17 01:46:52 +00:00 committed by Gitee
parent 40715336e3
commit 5bdb1db0b1
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 1 additions and 1 deletions

View File

@ -111,7 +111,7 @@ public class FileUploadUtils
String fileName = extractFilename(file);
File desc = getAbsoluteFile(baseDir, fileName);
file.transferTo(desc);
org.apache.commons.io.FileUtils.copyInputStreamToFile(file.getInputStream(), desc);
String pathFileName = getPathFileName(baseDir, fileName);
return pathFileName;
}