Every time i upload a file. The results on the server are corrupted. The files that get uploaded are always slightly smaller than the amount of data i tried to upload.
// set up client
ftp = new FTPClient();
ftp.setRemoteHost(host);
FTPMessageCollector listener = new FTPMessageCollector();
ftp.setMessageListener(listener);
//ftp.setAutoPassiveIPSubstitution(true);
// connect
log.info("Connecting");
ftp.connect();
// login
log.info("Logging in");
ftp.login(user, password);
// set up passive ASCII transfers
log.debug("Setting up passive, ASCII transfers");
ftp.setConnectMode(FTPConnectMode.PASV);
ftp.setType(FTPTransferType.ASCII);
// copy file to server
log.info("Putting file");
Math.random();
ftp.put(path+originalfile, App.user+App.val+originalfile);
// Shut down client
log.info("Quitting client");
ftp.quit();