修复ftp客户端提交关闭问题

master
zengwh 2 years ago
parent 5efba25987
commit c7945897b2

2
.gitignore vendored

@ -1,4 +1,4 @@
target/
/target/
!.mvn/wrapper/maven-wrapper.jar
### STS ###

@ -66,9 +66,6 @@ public class FTPUtil {
}
} catch (IOException e) {
throw e;
}finally {
ftpClient.abort();
ftpClient.disconnect();
}
return ftpClient;
}
@ -107,7 +104,6 @@ public class FTPUtil {
while ((i = is.read(bytes)) != -1) {
fos.write(bytes, 0, i);
}
closeFTPConnect(ftp);
}
if(file.length() == 0 || file.length() < 10){
FileUtils.deleteImageFile(file);
@ -129,6 +125,7 @@ public class FTPUtil {
FileUtils.deleteImageFile(file);
throw e;
}
closeFTPConnect(ftp);
}
return result;
}

Loading…
Cancel
Save