I didn't know that the <a>
element had a download
attribute, nor that it could rename the file on download for you e.g:
<a href="/files/ugly-file-name.xyz" download="nice-file-name.xyz">download</a>
On top of which, I didn't know that redirects using Netlify's _redirects
file (which I do know about 😀) would allow for same-domain downloads (which the download
attribute requires):
/download/* https://clearleft-audio.s3.amazonaws.com/podcast/:splat 200
Basically, this whole article is a TIL.