Dowload a file using a button


#1

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


#3

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


#4

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


#5

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