Upload own files from my own pc with Node Red Dashboard

Hey guys,

first my English is not so good. I am sorry if i make worst sentences or questions.

I would be very happy if someone can help me with this problem.

How can I create something on the Node Red Dashboard where files like .fmu or other files will be uploaded on an any folder on my own pc?

Example: I go to the Node Red dashboard click on an any button or an other thing then the file automatically upload on a folder on my own pc.

1 Like

I am a node red beginner, but to trigger a flow you would need some control in the dashboard that starts the flow.

To upload a file somewhere, I would write a (bash..?) script, That I can test without node-red at all and then start it with an exec node.

Where does the file come from (where is it stored) before you want upload it to your PC?

Thank you for your answer.

What is a bash script? Is it a package in Node-Red?


No, it is a way to define and later execute tasks to do (one or more) that may be not directly supported in Node Red. Just google, depending on your OS for "batch", "Powershell", "bash", "Shell script", "bat", ".cmd", ...

If you tell which file you want to upload from where, maybe there is a way also in NodeRed.

Make a google search and found many

You could choose flow or install new node, there s many choices

1 Like

It is a .fmu file. I want that this .fmu file all the time if I want upload in a folder on my own pc if I click on something at the NodeRed Dashboard. So I want to give this command from NodeRed.

Is the file on the machine running the browser or on the machine running node-red, and where are you trying to send it to?

The file is running on the machine not in browser. I should be upload in any folder it doesn't matter in which folder. It isn't a special folder.

For example: I have a file. My partner and I are working on a project and I want to give this file to my project partner and so we want to create something on the NodeRed dashboard where my partner can click on it an the file would upload on his pc.

So you have a file on the machine running node-red and you want to send that to a PC. When you say your partner will click on it do you mean that he/she is showing the dashboard in a browser and wants the file to be sent to the PC running the browser? If so then what you want to do is to download the file to the PC. It is the same as, for example, going to a website and asking to download a document from the website. Upload is when you send a file from the PC running the browser to the server machine (that is the one running node-red in this case).
If you go to the node red flows site and search for Download you will find a number of possibilities, including this one which looks like it does what you want.

[Edit] Why don't you just set up file sharing between the two PCs or use something like Dropbox?

I have a solution somewhere for file upload via http request, and i just added an <a src=requesturl> in a node-red button name field and it is working fine for me( just needed to click exactly on text) i will send it later when i get home.

Yes I have a file on my PC. I am working on it with NodeRed and then I want to send it with NodeRed to my partner to show him directly what I did on the project. We want to upload and show other work without loosing time and with a quickly way to show the other one what I do now.
Okay I will look for a flow, I hope I will find something.

Are you at home now?

Oh sorry mate i completely forgot to send you the flow , as it was an old project...
Here is the flow i used https://flows.nodered.org/flow/cbf44e064b9406a1175a7e8d589f66ac

I try to install the package and built something at the dashboard. Now I can choose a file and can upload it but I don't know where the file goes. Do you have any idea?

The file doesn't go anywhere, it is read as a stream of buffer, that you can then write to new file, store it, convert to readable state( if a text file) or do anything you wish...

Do have a option to upload a file that goes anywhere?

By definition, 'upload' means to send the file from the PC to the server (as I explained a few posts ago). Do you mean you want to send a file from the node-red server to a completely different PC or to the PC running the dashboard?

yes I want to send a file to a completely different PC which is running the NodeRed dashboard or is working with NodeRed

Sorry, it still is not entirely clear. How many machines are involved in this? I know there are at least two PCs, call them PC A and PC B. There is a file on PC A that you want to send to PC B.

Questions:

  1. Are both A and B running the node red dashboard in a browser?
  2. Which dashboard do you want to initiate the transfer from, A or B?
  3. Where is the node-red server running? Is that on PC A, B or on an another machine?

We have got to 19 posts in this thread and you still have not told us the basic details of what you are trying to do.

1 Like