Page 1 of 1

link to download a file

Posted: Tue Jul 16, 2019 7:01 pm
by ddaugherty
How can I create a link to allow a visitor to download a file? I've tried setting "Link to" as a "External Web Address" and "File". Both open and display the file when the link is selected. I want it to just download the file, not open it. Thanks.

Re: link to download a file

Posted: Tue Jul 16, 2019 7:46 pm
by Psycho
Have you tried the download attribute ? it must be set within the href reference attribute

Not sure if all browsers support it but worth a shot

<a href="image.jpg" download>

Simply change the file name and file attribute above for the file you want folk to download

Re: link to download a file

Posted: Tue Jul 16, 2019 8:27 pm
by BaconFries
See the following reading from "link to a file" Links
You can then add a simple text beside the link telling the readers that they need to right-click (Windows) or ctrl-click the (Apple) link in order to download it.

Re: link to download a file

Posted: Mon Jul 22, 2019 8:31 pm
by ddaugherty
I ended up using this html code and it works:

<html>
<body>
<a href="docs/lifegroup.pdf" download>
<button>Class Directory</button>
</a>
</body>
</html>

The name of the file to download is lifegroup.pdf. Be sure to upload it to a sub folder on your server otherwise it won't download if you put it in the root directory.

The size of the button depends on how you size the HTML property box. Class Directory is the label on the button.
Below the button, I put text saying: Directory Download