This is an automated email from the ASF dual-hosted git repository.

hansva pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hop.git


The following commit(s) were added to refs/heads/master by this push:
     new 948c4cd076 process binaryMode option in FTP put. fixes #3499
     new aa03f0abb0 Merge pull request #3500 from bamaer/master
948c4cd076 is described below

commit 948c4cd076f1023fba281a9dc0f65925be54b53d
Author: Bart Maertens <[email protected]>
AuthorDate: Fri Dec 15 14:36:18 2023 +0100

    process binaryMode option in FTP put. fixes #3499
---
 .../java/org/apache/hop/workflow/actions/ftpput/ActionFtpPut.java     | 4 ++++
 1 file changed, 4 insertions(+)

diff --git 
a/plugins/actions/ftp/src/main/java/org/apache/hop/workflow/actions/ftpput/ActionFtpPut.java
 
b/plugins/actions/ftp/src/main/java/org/apache/hop/workflow/actions/ftpput/ActionFtpPut.java
index 93e9e5985a..cdce8b78e3 100644
--- 
a/plugins/actions/ftp/src/main/java/org/apache/hop/workflow/actions/ftpput/ActionFtpPut.java
+++ 
b/plugins/actions/ftp/src/main/java/org/apache/hop/workflow/actions/ftpput/ActionFtpPut.java
@@ -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;
@@ -558,6 +559,9 @@ public class ActionFtpPut extends ActionBase implements 
Cloneable, IAction, IFtp
                           + ftpclient.getReplyString());
                 }
               }
+              if(binaryMode){
+                ftpclient.setFileType(FTP.BINARY_FILE_TYPE);
+              }
               boolean success = ftpclient.storeFile(file, inputStream);
               if (success) {
                 filesPut++;

Reply via email to