FTP passive mode
This commit is contained in:
parent
abf2e99ab6
commit
a61d860ddb
|
@ -57,7 +57,6 @@ public class FTPClient {
|
||||||
else {
|
else {
|
||||||
clientImpl.connect(server);
|
clientImpl.connect(server);
|
||||||
}
|
}
|
||||||
//clientImpl.setFileTransferMode(FTP.BINARY_FILE_TYPE);
|
|
||||||
|
|
||||||
clientImpl.login(user, password);
|
clientImpl.login(user, password);
|
||||||
|
|
||||||
|
@ -93,6 +92,7 @@ public class FTPClient {
|
||||||
String resolvedPath = resolveRemotePath(path);
|
String resolvedPath = resolveRemotePath(path);
|
||||||
FileInputStream localStream = new FileInputStream(source);
|
FileInputStream localStream = new FileInputStream(source);
|
||||||
clientImpl.setFileType(FTP.BINARY_FILE_TYPE);
|
clientImpl.setFileType(FTP.BINARY_FILE_TYPE);
|
||||||
|
clientImpl.enterLocalPassiveMode();
|
||||||
clientImpl.storeFile( resolvedPath, localStream);
|
clientImpl.storeFile( resolvedPath, localStream);
|
||||||
localStream.close();
|
localStream.close();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue