
stackoverflow.com › questions › how-to-download-file-in-react-js. Triggering browser download from front-end is not reliable. What you should do is, create an endpoint that when called, will provide the correct. EDIT: I just saw the details and noticed you're trying to use javascript. That's definitely classier and although I'm really rusted on my JS, it seems that you want more.
-