I receive this log message:
The FTP client has not yet connected to the server. The requested action cannot be performed until after a connection has been established.
When attempting to set Binary transfer after login. No other errors or log entries are sent.
code:
public String uploadFile() {
try {
FTPClient ftp = new FTPClient();
ftp.setRemoteHost(dest[s]);
ftp.login(user[s],pass[s]);
ftp.setType(FTPTransferType.BINARY);
ftp.chdir(destfolder[s]);
ftp.put(localfolder[s]+filename[s],filename[s]);
ftp.quit();
} catch(Exception e){
System.out.println( e.getMessage());
return localfolder[s]+filename[s]+" failed.";
}
return filename[s]+" uploaded.";
}