I am trying to upload a 67MB PDF file to a ftp location within our network. Earlier, the file transfer was happening without any issues and was very fast, but the file was getting corrupted. Hence I changed the code to set the transfer type to BINARY by the following code.
com.enterprisedt.net.ftp.FTPClient ftpClient = getFTPClient();
ftpClient.setType(FTPTransferType.BINARY);
ftpClient.put(sourceFileName, destFileName);
Now with the code change, the transfer speed has become very slow. A 7MB file within the network takes about 20+ mins and the 67MB file doesn't even transfer successfully. The transfer gets terminated midway (at random points) and the transfer is slow too.
There are no network issues. I tried transferring the same 67MB file to the same ftp location using command line ftp and the transfer is done in abt 6 secs. Is there any other code setting that needs to be done? I am using the DEFAULT-FTP method and connecting to PORT 22.
Can someone help?
Thanks.