Upload file sends file binary
Brought to you by:
arnold_mad,
kurt_tas
When trying to upload a text file from a windows
machine to a non ascii (iSeries) machine, the file is
always uploaded in binary mode.
The problem is the piece of code below
FTPConnection.java:
public void uploadFile(FTPFile fromFile, FTPFile
toFile,boolean resume)
throws IOException, FtpWorkflowException, FtpIOException
{
..
//Send TYPE I
Command commandType = new Command(Command.TYPE_I);
(sendCommand(commandType)).dumpReply();
..
}
Removing this piece of code seems to solve the problem.
The FTPFile has a methode setTransferType which does
not seem to be used.
Logged In: YES
user_id=1561119
Well you could always use setTransferType(boolean) (from
your FTPConnection object) to manually force binary or ascii
transfers.
Logged In: YES
user_id=1561119
Ignore my last comment, the code you've pasted would still
be executed.