fix:文件上传bug
This commit is contained in:
parent
05b6e83608
commit
5d166aa419
|
@ -62,10 +62,8 @@ public class SpectrumFileServiceImpl implements ISpectrumFileService {
|
|||
FileOutputStream fos = null;
|
||||
ZipInputStream zipInputStream = null;
|
||||
String slash = SymbolConstant.SINGLE_SLASH;
|
||||
//ftp父级路径
|
||||
String rootPath = ftpUtil.getFtpRootPath();
|
||||
//上传文件夹路径
|
||||
String filePath = rootPath + spectrumPathProperties.getUploadPath() + slash + username;
|
||||
String filePath = spectrumPathProperties.getUploadPath() + slash + username;
|
||||
//本地临时文件夹路径
|
||||
String tempFilePath = System.getProperty("java.io.tmpdir") + username + slash;
|
||||
List<String> fileNames = new ArrayList<>();
|
||||
|
@ -111,7 +109,7 @@ public class SpectrumFileServiceImpl implements ISpectrumFileService {
|
|||
}
|
||||
String fullFilePath = filePath + slash + fileName;
|
||||
FileInputStream local = new FileInputStream(oneFile);
|
||||
boolean success = ftpClient.storeFile(fullFilePath, local);
|
||||
boolean success = ftpClient.storeFile(fileName, local);
|
||||
if (!success) failList.add(fullFilePath);
|
||||
}
|
||||
if (CollUtil.isNotEmpty(failList))
|
||||
|
|
Loading…
Reference in New Issue
Block a user