ftp4j took 8 minutes to upload a 118MB file
Okay this is just stupid. There's no reason why ftp4j should be taking 8
Minutes to upload a 118MB file. Why is this?
FTPClient client = new FTPClient();
client.connect(config.getremoteftpserver());
client.login(config.getremoteftpuser(),config.getremoteftppasswd());
client.setType(FTPClient.TYPE_BINARY);
Date date= new Date();
DateFormat df=config.getdateformat();
String datestr=df.format(date);
try {
client.createDirectory(datestr);
} catch (FTPException FTPe) {
if (FTPe.getCode()!=550) throw new FTPException(0);
System.out.println("Directory Already Exists");
}
client.changeDirectory(datestr);
//Upload file
File myfile= new File(data.getZipfile());
client.upload(myfile);
System.out.println(data.getZipfile());
System.out.println(client.currentDirectory());
client.disconnect(true);
I was looking at Microsoft's Stateful FTP firewall when dealing with some
problems earlier and don't even run microsoft's crappy firewall so I know
it's not that.
No comments:
Post a Comment