Commit 7a7764b9 authored by 廖旭伟's avatar 廖旭伟

上传接口修改

parent 285d181b
......@@ -50,9 +50,7 @@ public class UploadServiceImpl implements UploadService {
throw new AppException("没有要上传的文件!");
}
if(StringUtils.isEmpty(prePath)){
prePath = "file/uploadfile/";
}else {
prePath = prePath.endsWith("/")?prePath:prePath+"/";
prePath = "file/uploadfile";
}
String fileName = tempFile.getOriginalFilename();
String extension = FilenameUtils.getExtension(fileName);
......@@ -66,8 +64,7 @@ public class UploadServiceImpl implements UploadService {
}
String rootPath = this.filePath.endsWith("/") ? this.filePath : this.filePath + "/";
// String filePath = rootPath + (StringUtils.isEmpty(prePath) ? "file/uploadfile/" : prePath + "/");
String filePath = rootPath + prePath;
String filePath = rootPath + (StringUtils.isEmpty(prePath) ? "" : prePath + "/");
File pathDir = new File(filePath);
if (!pathDir.exists()) {
pathDir.mkdirs();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment