Downloading a file from dashboard only work if I have the Node-RED editor open in my browser too?

Can anyone help me understand why my FlowFuse Dashboard v2 app will only allow me to download a file if I have the Node-RED editor open in the same browser too. If I close the NR editor, nothing happens when I click my download button to download the selected file? Open the editor back up in another window and it works as expected?

I'm using the @prescient-devices/node-red-contrib-downloadfile node.

because that download node is specifically for downloading from the node-red editor. Its JS code runs inside the Node-RED editor so when its closed, it doesnt work.

to download a file from dashboard, you need to set up a link that points to a served file.

So either put the CSV in a served location or serve it using http-in ~ load file ~ http-response

Here is a post that will get you partially there with the UI side: Downloading Files with ui-template - #6 by Steve-Mcl

1 Like

Can you describe in more detail exactly what you are trying to do?

The dashboard includes as standard the ui-file-input node which allows you to browse for a file in the machine running the dashboard browser and send it to the node-red server machine, but perhaps you are trying to do the opposite.

@Steve-Mcl Thanks for the explanation on the node behavior.

I basically ended up doing exactly what you suggested and got it working that way.

@Colin Yeah, I was doing the opposite. I ended up using http nodes to serve the files up that way and make them accessible for downloading.

1 Like