I've have a problem with FTP Transfer image. Problem involves when, after connect to remote ftp server and do a right login, i try to send a local file (an image file, .jpg, .gif, ,png, etc) to remote ftp server. Transfer happens but the content of transferred file is corrupt, or rather i see my remote image as corrupt image, remote image size is less than original image size.
Here i attach my piece of code:
try {
ftp.connect(host);
if(!ftp.login(user, password)) {
ftp.logout();
}
ftp.enterLocalPassiveMode();
ftp.setFileType(FTP.BINARY_FILE_TYPE);
InputStream in = new FileInputStream(current);
ftp.storeFile(remote,in);
in.close();
ftp.disconnect();
} catch (Exception e) {}In this example i use windows ftp server.
i can't understand error, i tried to upload a plain text file and all is correct, but when i try to upload image file i get a corrupt image file on remote server.
Please help me, i'm in trouble.
Tnx in advance regards mulp
_________________________________________________________________ Scarica gratuitamente MSN Toolbar! http://toolbar.msn.it/
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
