# How to make a download button with the Template-Node (Dashboard)

**URL:** <https://discourse.nodered.org/t/how-to-make-a-download-button-with-the-template-node-dashboard/76044>\
**Category:** Dashboard\
**Created:** [3 March 2023 08:11 UTC](https://discourse.nodered.org/t/how-to-make-a-download-button-with-the-template-node-dashboard/76044 "2023-03-03T08:11:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Larssers](https://avatars.discourse-cdn.com/v4/letter/l/e99b99/32.png) [@Larssers](https://discourse.nodered.org/u/Larssers)\
**Post date:** [3 March 2023 08:11 UTC](https://discourse.nodered.org/t/how-to-make-a-download-button-with-the-template-node-dashboard/76044/1 "2023-03-03T08:11:30Z")

</div>

Hi, I am pretty new to Node-Red and need some help here. Also English isn't my first language, so please be patient with me.

My goal currently is to make a UI, where you can upload a file, which get some format changes via function node. After the function node ran through the code, the data will be saved within a new location, which will be the same all the time. Now I get to a problem:  
See, I am using Node Red on the browser and usually I don't have to save files. Because of this I am just using this library:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/1/411f43b4a973146ed4a269cef56b264b205eb67b.png)

Everything just works fine, but I am not able to make the download button to work. The download button is just a template node, which is coded like this:

```auto
> <div>
> <a href="/files/flows/test/Converted_File.csv" download="Converted_File.csv">
> <button class="btn"><i class="fa fa-download"></i> Download</button></a>
> </div>

```

This simply creates a button, which says 'Download' and is supposed to download the file, that was just created.  
But when you press the button, the browser says "Failed - No file" and doesn't download anything.  
I know, that it is because it couldn't find the file with the "href"-link, but I don't know, what else I am supposed to write to href, because if i just put "msg.payload" there (with or without ""), it doesn't download a file and apparently the library can't be accesed like this.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/6/766eca055ae2f94c31c7772dbd09c083fdaa738f.png)  
That is the flow I am using.

Every help is appreciated!

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [3 March 2023 11:11 UTC](https://discourse.nodered.org/t/how-to-make-a-download-button-with-the-template-node-dashboard/76044/2 "2023-03-03T11:11:45Z")

</div>

Try this demo flow: [Download a file from node-red using standard nodes (flow) - Node-RED](https://flows.nodered.org/flow/db68bd4934cf46f39e6e453a348bc419)

---

<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:** [2 April 2023 11:11 UTC](https://discourse.nodered.org/t/how-to-make-a-download-button-with-the-template-node-dashboard/76044/3 "2023-04-02T11:11:55Z")

</div>

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