create link with file download [closed]

1

Galera will create a link on my site for the user to download a file. The link works 100%, however after the user clicks download the file and downloaded to the computer's download folder. How do I get the browser to open the window asking me where to save the download?

Example link I created.

<div onclick='document.location="Arquivos/arquivo.rm"'>Baixar</div>

The file has the .rm extension

    
asked by anonymous 19.10.2016 / 14:04

1 answer

4

Hugo, for security reasons, you can not do this manipulation.

To display the window where the file should be saved, the user must select this option in the browser settings.

For example, in Chrome v53.0.2785.143 this option is in Settings, as shown in the image below:

    
19.10.2016 / 14:12