Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

FTP Connector - Is Binary mode possible

Hello

I have an integration that moves text files from a GCS bucket to a Linux hosted FTP server. The files in the bucket are UTF-8 CRLF encoded. When i look at the files on the destination server, it appears that the line breaks are converted to LF.

I made a second version of the intergration in which I used the HasBytes property in the GCS connector (to get the content in an encoded format and not text) and did the same for the FTP connector (ContentBytes and HasBytes=True). I though that this would force the Binary transfer mode and so preserve the CRLF formatting.

But this has not worked. User still reports that the encoding of the file has changed.

So my question is : should the HasBytes = True setting force the use of Binary mode in the FTP transfer or is there another way?

Regards

0 5 631
5 REPLIES 5

Hi @phertzog , 

Thanks for your question.  Yes, the HasBytes = true and using ContentBytes for the file contents instead of Contents will cause the FTP connection to use binary mode.  Can you double check your configurations end to end to see if you have this setting on both sides?

 

Hello,

I check the configuration on the integration side. Unfortunately I don't have access to the remote FTP server. Is there a specific setting I should ask the provider to check?

Regards.

Philippe

Hi @phertzog,
You mentioned you don't have access to the remote server, so are you using any ftp client to view the files? If yes, can you please confirm your client is using binary mode for transfer? Since you're viewing .txt files, in some clients the default transfer mode might be ASCII, and your client might be responsible for this conversion. 

Hello,

I use FileZilla to access the remote server and FileZilla is set to use Binary as transfer.

And as a hint, if I check the sizes of the file (displayed in filezilla) I see that the remote file is 35 bytes whereas the local file is 38 bytes. This is consistent with 3 CR-LF changed to LF.

Regards

I have shared a sample integration with you on private message. Can you please try it out and let me know if it worked for you. 

Top Labels in this Space