Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
3.6k views
in Java FTP by (160 points)
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.

3 Answers

0 votes
by (162k points)
Port 22 is the SSH port - sure it shouldn't be port 21?
0 votes
by (160 points)
The destination server is not in our control. They have given us port 22 to use. Could that be an issue?
0 votes
by (162k points)
So with command line FTP are you specifying port 22?

Categories

...