# Uploading a file on remote server

**URL:** https://discourse.nodered.org/t/uploading-a-file-on-remote-server/62681
**Category:** General
**Created:** [16 May 2022 08:53 UTC](https://discourse.nodered.org/t/uploading-a-file-on-remote-server/62681 "2022-05-16T08:53:45Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![mirzafaraz82](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mirzafaraz82/32/61306_2.png) [@mirzafaraz82](https://discourse.nodered.org/u/mirzafaraz82)
#### Post date: [16 May 2022 08:53 UTC](https://discourse.nodered.org/t/uploading-a-file-on-remote-server/62681/1 "2022-05-16T08:53:45Z")

</div>

Hello everyone,  
I have a quick question, Is there any node that can be used to upload a file on a remote server?  
I tried using SMB node but its not working correctly. Any other suggestion from the forum?

Use case: I have to upload a CSV file every day on a remote server using NodeRed, this file will create its own name using the date of that particular day, so that there are no same files on the server.  
I have been trying this for a while but not able to find the right solution. I hope find one on this forum.

Thanks and regards

---

<div class="post-metadata">

### Author: ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)
#### Post date: [16 May 2022 09:27 UTC](https://discourse.nodered.org/t/uploading-a-file-on-remote-server/62681/2 "2022-05-16T09:27:19Z")

</div>

I've not tried the SMB nodes.  
I did try various FTP nodes but couldn't get them to work with my ISP.

I ended-up writing a Python script to handle sFTP transfers and called it from an Exec node in Node-RED.  
It works with a remote sFTP server as well as my local NAS.  
Although I've used it to upload jpg files, I'm sure it would handle csv files.

**Edit** : Just tried a CSV file and it handles that format just fine.

You will probably get other (better) suggestions from other members on the forum.

 ![Screen Shot 05-16-22 at 02.55 PM](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/e/5e99dc4f6fa5924ef25115a3e88bb5331bcf9f34.png)

---

<div class="post-metadata">

### Author: ![anassettijare](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/anassettijare/32/61447_2.png) [@anassettijare](https://discourse.nodered.org/u/anassettijare)
#### Post date: [16 May 2022 14:47 UTC](https://discourse.nodered.org/t/uploading-a-file-on-remote-server/62681/3 "2022-05-16T14:47:36Z")

</div>

hello ! please i am working in similar project, i want to upload files with csv format from a FTP server to another one but the two servers are not in the same network, i can use Filezilla for that but i want to automate this task, so can you send me your flow specially the script python and the function blocs .

---

<div class="post-metadata">

### Author: ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)
#### Post date: [17 May 2022 08:54 UTC](https://discourse.nodered.org/t/uploading-a-file-on-remote-server/62681/4 "2022-05-17T08:54:38Z")

</div>

I've written a short guide on how to 'Upload a file to a remote server' for my IoT students.  
Here's the link to the post on the 'Share Your Projects' section of the forum.

> [@Using FTP(S) to transfer files to/from a remote FTP server](https://discourse.nodered.org/t/using-sftp-to-transfer-files-to-from-a-remote-ftp-server/62735):
>
> Some of my IoT students have encountered problems trying to get some of the FTP (Node-RED) contrib nodes working. This may be due to the restrictions on the school network and/or the school's ISP. As an exercise I tried writing a couple of Python scripts to use the FTP\_TLS library to send and receive files between a Raspberry Pi and a remote FTP server. As shown below, the scripts are called from a Node-RED flow using an Exec node. [{"id":"678f819f147e416a"…

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [16 July 2022 08:55 UTC](https://discourse.nodered.org/t/uploading-a-file-on-remote-server/62681/5 "2022-07-16T08:55:30Z")

</div>

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