Hello all. My website has a “resource library” for our visitors that is connected to a Webflow Collection. Right now, when the user clicks the “Access This File” button in the collection item, it opens the file (PDFs and PNG images) in a new browser tab. This is not ideal, as the goal is for them to download the file on click.
Is there a resource or method for triggering a download when a user clicks a link element?
You don’t have the ability to change how Webflow serves files and browsers often don’t use HTML attributes like download the way you’d expect.
Two main options;
One is to move the assets out of the CMS and to another platform… Google drive, an Amazon S3 bucket, dropbox, etc. Depends on your download size and traffic, but try to keep it easy to administer. In the CMS, you’d store that external link.
Reverse proxy Webflow and change the MIME type of your PDF assets to application/octet-stream so that they will download rather than display.
For low-traffic sites, Google Drive is a workable choice for this; I use it in particular when client need to be able to edit a doc like a menu or price list, and have the PDF updated automatically.