How to save a file getting downloaded from server using react?

Posted by Jessica Taylor | Updated on

Want to save a file getting downloaded from server using react? A GET request in JS is not the same as visiting a url in your browser. You need to directly invoke a download on the client by specifying an URL, for example like this:


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers