I\'m trying to do a VERY simple file upload. I want a Java FTPClient that can upload any file I tell it to. But the pdf always gets all messed up and my pdf editor (Adobe) w
Try to use BufferedInputStream, this is a (working) code sample:
BufferedInputStream bis = new BufferedInputStream(new FileInputStream(f));
res = client.storeFile("File Name", bis);
bis.close();
client.logout();
Try this.
objFtpClient.setFileType(FTP.BINARY_FILE_TYPE);
objFtpClient.setFileTransferMode(FTP.BINARY_FILE_TYPE);
objFtpClient.enterLocalPassiveMode();