Force downloads in your Statamic site.
- Copy
hooks.download.phpandpi.download.phpinto_add-ons/download/
Create a download URL by using the plugin tag:
<a href="
{{ download file="/assets/IMG1234.jpg" as="photo.jpg" }}
">Download Photo</a>
The file parameter can also be filename or url. Whichever you prefer.
The as parameter is optional. This will let you control the filename of the downloaded file.