I don't have a lot of front end experience, but the way I've done it in the past was with
<a download href="example.com/my/download/route"></a>
and that always worked well for me. No idea if that would be helpful at all, I'm operating at a very surface level knowledge here.