FTP passive mode

This commit is contained in:
Grahame Grieve 2023-01-16 22:13:38 +11:00
parent abf2e99ab6
commit a61d860ddb
1 changed files with 1 additions and 1 deletions

View File

@ -57,7 +57,6 @@ public class FTPClient {
else {
clientImpl.connect(server);
}
//clientImpl.setFileTransferMode(FTP.BINARY_FILE_TYPE);
clientImpl.login(user, password);
@ -93,6 +92,7 @@ public class FTPClient {
String resolvedPath = resolveRemotePath(path);
FileInputStream localStream = new FileInputStream(source);
clientImpl.setFileType(FTP.BINARY_FILE_TYPE);
clientImpl.enterLocalPassiveMode();
clientImpl.storeFile( resolvedPath, localStream);
localStream.close();