Skip to content

Commit

Permalink
process binaryMode option in FTP put. fixes apache#3499
Browse files Browse the repository at this point in the history
  • Loading branch information
bamaer committed Dec 15, 2023
1 parent edebe1b commit 948c4cd
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

package org.apache.hop.workflow.actions.ftpput;

import org.apache.commons.net.ftp.FTP;
import org.apache.commons.net.ftp.FTPClient;
import org.apache.hop.core.Const;
import org.apache.hop.core.ICheckResult;
Expand Down Expand Up @@ -558,6 +559,9 @@ public Result execute(Result previousResult, int nr) {
+ ftpclient.getReplyString());
}
}
if(binaryMode){
ftpclient.setFileType(FTP.BINARY_FILE_TYPE);
}
boolean success = ftpclient.storeFile(file, inputStream);
if (success) {
filesPut++;
Expand Down

0 comments on commit 948c4cd

Please sign in to comment.