CSV file partially written to SFTP server

With this workflow I’m creating a CSV file that I need to upload to an SFTP server. The file, when it gets created by the JSON to Binary node has a size of about 650kb. However when it gets uploaded by the SFTP node only 100kb of the file appears on the server. I tried to figure it out on my own but cannot seem so find out why the file is only partially uploaded to the sftp server.

  • n8n version: 1.18.1
  • Database (default: SQLite): Postgres
  • n8n EXECUTIONS_PROCESS setting (default: own, main): main (I think)
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • Operating system: Unix/Ubuntu

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hey @Erhan_Ozturk,

I have not seen that happen before, One of the things I like about SFTP is the protocol has integrity checking built in so the file that is sent will be the same as the file that arrives.

If you download the binary file from the UI is it also 650KB? Can you also confirm what you have N8N_DEFAULT_BINARY_DATA_MODE set to at the moment? Would you also be able to add a wait node after the create csv file node and put in something like 20 seconds to see if that changes anything.

1 Like

@Jon,

I did some testing on our dev environment which has a bit less data for the file. The output of the create csv node indicates a filesize of 450kb. When I download the file it has a size of 440 kb, I even tried emailing it to myself which has a filesize of 439 kb. I’ve verified that both files contain all of the data that it should contain. When uploading to the SFTP it still only has a filesize of around 100 kb

N8N_DEFAULT_BINARY_DATA_MODE is currently set to default. Using the wait node did not change anything unfortunatly.

Can you try changing N8N_DEFAULT_BINARY_DATA_MODE to filesystem and see if that helps?

2 Likes

This worked for us. The files that are being uploaded to the sftp server are now the complete file

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.