I'm building a web app in Python and Flask. This is the directory structure:
TopWebApp
│
└───webApp
│ │ ui.py
│ │ back-end.py
│ │ result.txt
│ │
│ └───templates
│ │ index.html
│ │ ...
│
└───venv
| ...
In index.html, I have:
<a href="C:\Users\...\webApp\result.txt" download>
<button>click here</button>
</a>
In chrome 70, when I click the "click here" button, nothing gets downloaded and if I open it in a new tab, the new tab will show "about::blank".
Since result.txt is saved under the same directory, I tried changing 'href=".result.txt"' and 'href="./result.txt"' but I get a Failed - No File when it downloads. Do you know why this happens?