Tagged: download button
Hi
I’d like to add a button that downloads a simple pdf.
when i add a button in a site it only let’s me link to a page or a post, but not to a document.
how do I do that?
Hey Rio1!
You can use a Shortcode with a button and change the link, to a file.
That is possible, have you tried it at all?
Best regards,
Basilis
Hey basilis,
So basically I would upload the file, and paste the file’s URL into the buttons custom link?
Hey Rikard,
yeah I tried it out. It works as far as opening a new tab and displaying the pdf in it.
I’d like the button to function as a direct download command though. (on click download without additional tabs being opened and the sit changing).
how can I do that?
Hi,
I don’t think that is something you can control since it comes down to what browser you are using, and what settings you have in it. Chrome for instance will open files like that in the browser, but you will get an option to save it locally once it’s open.
Best regards,
Rikard
okay, thank you
You can do this by adding “download” to your URL. Like this…
<a href="myfile.pdf" download>DOWNLOAD PDF</a>
Ref: https://www.philowen.co/blog/force-a-file-to-download-when-link-is-clicked/