文件夹上传优化
This commit is contained in:
parent
65bbd30d2c
commit
6073aef7c0
@ -86,8 +86,7 @@ public class FiletransferController {
|
||||
if (relativePath.contains("/")) {
|
||||
userFile.setFilePath(uploadFileDto.getFilePath() + PathUtil.getParentPath(relativePath) + "/");
|
||||
fileDealComp.restoreParentFilePath(uploadFileDto.getFilePath() + PathUtil.getParentPath(relativePath) + "/", sessionUserBean.getUserId());
|
||||
String rootPath = relativePath.split("/")[0];
|
||||
fileDealComp.deleteRepeatSubDirFile(uploadFileDto.getFilePath() + rootPath + "/", sessionUserBean.getUserId());
|
||||
fileDealComp.deleteRepeatSubDirFile(uploadFileDto.getFilePath(), sessionUserBean.getUserId());
|
||||
} else {
|
||||
userFile.setFilePath(uploadFileDto.getFilePath());
|
||||
}
|
||||
|
@ -103,9 +103,7 @@ public class FiletransferService implements IFiletransferService {
|
||||
if (relativePath.contains("/")) {
|
||||
userFile.setFilePath(uploadFileDto.getFilePath() + PathUtil.getParentPath(relativePath) + "/");
|
||||
fileDealComp.restoreParentFilePath(uploadFileDto.getFilePath() + PathUtil.getParentPath(relativePath) + "/", userId);
|
||||
String rootPath = relativePath.split("/")[0];
|
||||
|
||||
fileDealComp.deleteRepeatSubDirFile(uploadFileDto.getFilePath() + rootPath + "/", userId);
|
||||
fileDealComp.deleteRepeatSubDirFile(uploadFileDto.getFilePath(), userId);
|
||||
|
||||
} else {
|
||||
userFile.setFilePath(uploadFileDto.getFilePath());
|
||||
|
Loading…
Reference in New Issue
Block a user