Streaming live at 10am (PST)

Button onclick direct download


#1

Hi webflow community,

I have a button that acts like a download button. I have a PDF I want the users to download when they click the button.

I uploaded the PDF to my server, but when the user clicks the button, his browser opens the PDF. I don’t want the user to be redirected outside the website, I don’t want to open a new tab either. I want that when you click the button, the file is directly downloaded and the users stays on the page.

How can I do this?

Thanks


#2

Hello @justafish

Can you share your read only link?

Here’s how > https://university.webflow.com/article/sharing-your-sites-read-only-link

For direct download you need to add a custom link attribute (download), but the download attribute can’t be added from the settings panel.

Piter :webflow_heart: