Published:
Category:
Tools
For many of my clients is necessary to share their files from the direct url based on their direct name instead of some other naming like upload.webflow etc. It was crucial in some cases to allow sharing the custom url for the donwloading of the files. So I have made a small workaround using Webflow CMS for customizing the URLs. So you will use nameurl.com/docs/file instead of uploads-ssl.webflow.com/filename.
Here is the Webflow CMS attachement workaround
Name the collection as you need like: "docs, assets, documents etc.". Add only required field: attachaments for uploading your files.
The custom code will start downloading of your attachament automatically when page is load.
<div onload="download()"></div><a id="dl" style="display: none" href="add your attachament field from collection here" download>Download</a><script> (function download() { document.getElementById('dl').click(); })() </script>
This step might be crucial for your customers as the downloading starts automatically. Let them knows what has happened on the page. Add the button to move them back on your homepage or list of your docs.
Last part is to add all unnecessary attachaments to your collection :-)
Leave me feedback or follow me on Twitter @BilekUI to stay updated!
Join me on Twitter
and stay in touch.
Published:
April 17, 2023
Category:
Tools
Published:
January 3, 2023
Category:
Tools