How to Make a Download Attribute Work with Cross-Origin URLs

3 replies
Last updated: May 25, 2020
Is there a way to make download attribute work with cross-origin URLs (aka Sanity CDN)? e.g.
<a download href="cdn.sanity…">Download this file</a>
May 24, 2020, 10:20 AM
May 25, 2020, 6:26 AM
Holy crap that worked, thanks! Is this a Sanity specific thing?
May 25, 2020, 6:58 AM
Great. Yes, as far as I know
May 25, 2020, 7:07 AM

Sanity – Build the way you think, not the way your CMS thinks

Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.

Was this answer helpful?