-2

I've made a website but the problem is when people is trying to download the file instead it opens the file not save as or download the file.

arkascha
  • 41,620
  • 7
  • 58
  • 90
  • 3
    Possible duplicate of [How can I force download with html and/or javascript?](https://stackoverflow.com/questions/8613725/how-can-i-force-download-with-html-and-or-javascript) – JJJ Oct 28 '17 at 13:15
  • Doesn't a simple search on google offer you information about that? You need to send out a http header. You want to add information on _how_ to handle some object you send. So the information cannot be _part of_ that object. You need to add it to the protocol layer, so a header entry. – arkascha Oct 28 '17 at 13:37

1 Answers1

0

use <a href="./assets/file.rar" download>Download file</a>

Martin Homola
  • 255
  • 1
  • 12