I’m trying to add a button in my dash application (which is embedded in a Flask server) to download a file previously generated containing data and graphs extracted from a SQL database from my XAMPP Server in my laptop to another device.
I’ve already tried it in html and it works:
<a href="file.docx" download><button>Download file</button></href>
And now I want to include it in dash language inside the code, in the shape of a button. I tried the following:
html.A(html.Button('Download file'), href="file.docx", download=True)
But what I get is an empty file which I can’t open, it says there is a problem with the content. But I checked several times that the original file is in the folder and it can be opened and see the content.
Any idea or help is appreciated