解决本地服务器上传包括空格的文件上传后下载不了的问题
This commit is contained in:
parent
689f0a5155
commit
fc121c14db
|
|
@ -83,6 +83,9 @@ public class FileUploadUtils
|
|||
|
||||
String fileName = extractFilename(file);
|
||||
|
||||
//去掉所有的空格
|
||||
fileName = fileName.replace(" ", "");
|
||||
|
||||
String absPath = getAbsoluteFile(baseDir, fileName).getAbsolutePath();
|
||||
file.transferTo(Paths.get(absPath));
|
||||
return getPathFileName(fileName);
|
||||
|
|
|
|||
Loading…
Reference in New Issue