# Dowload a file using a button

**URL:** <https://discourse.nodered.org/t/dowload-a-file-using-a-button/1483>\
**Category:** General\
**Created:** [10 July 2018 13:23 UTC](https://discourse.nodered.org/t/dowload-a-file-using-a-button/1483 "2018-07-10T13:23:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![gabrieldicieri](https://avatars.discourse-cdn.com/v4/letter/g/9dc877/32.png) [@gabrieldicieri](https://discourse.nodered.org/u/gabrieldicieri)\
**Post date:** [10 July 2018 13:23 UTC](https://discourse.nodered.org/t/dowload-a-file-using-a-button/1483/1 "2018-07-10T13:23:12Z")

</div>

I already have a file being written with some values ​​in my Public folder of raspberry(/home/pi/public), also I have set the static to (httpStatic: '/ home / pi / public') on settings.js, now I want to create a button so the user can download the file, I tried this code: (`<a href="/StorageData.xlsx" download="StorageData.xlsx"> Download Text </a>`) and it informs an error that the file can not be obtained. Can anybody help me?

Thanks

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [10 July 2018 13:28 UTC](https://discourse.nodered.org/t/dowload-a-file-using-a-button/1483/3 "2018-07-10T13:28:28Z")

</div>

Wrap code samples in backticks (`) so they get `formatted properly`. Otherwise the `< >` will get stripped off.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [10 July 2018 14:51 UTC](https://discourse.nodered.org/t/dowload-a-file-using-a-button/1483/4 "2018-07-10T14:51:09Z")

</div>

If you put, in the browser url, `<ip>:1880/StorageData.xlsx` does it find the file?

---

<div class="post-metadata">

**Author:** ![gabrieldicieri](https://avatars.discourse-cdn.com/v4/letter/g/9dc877/32.png) [@gabrieldicieri](https://discourse.nodered.org/u/gabrieldicieri)\
**Post date:** [12 July 2018 13:49 UTC](https://discourse.nodered.org/t/dowload-a-file-using-a-button/1483/5 "2018-07-12T13:49:34Z")

</div>

I had the solution, the problem was in the static folder! thank you
