I'm trying to add a button on my page so that when I click on it, it downloads a file on the web browser I use. The file I want to download is on my project:
And the script for the button is as follows:
download(){
const link = document.createElement("a")
link.href = "../../public/Programme robot/programme_palettisation_robot.tb"
link.setAttribute("download", "programme_palettisation_robot.tb")
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
setTimeout(function() { URL.revokeObjectURL(link.href); },1500)
}
The problem is that when I click on the button, it says that the file cannot be found.
Can you help me with this?

