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.
Hey, I think I might have found a solution for this.
Its using Google Drive to grab the “Share Link”, but not to actually share. You grab the ID within the share link that google drive provides, and replace it with a url that simply downloads the file and never redirects the user outside the website.
Hey there! I’m trying to do a similar thing, but I want the user, once the download has begun, to redirect to another page. Any Chance you know how to do that?