I am trying to download the .db files via browser that are present on my webserver so that I can back them up. The DB files are SQLite3 db files and they have ANSI encoding when I download them they are converted to UTF-8 and that is corrupting the database file. How do I download the DB files without corrupting them ? And my web Server is Mongoose embeded web server.
Edit - Posting code for reference
I am using React for my front end code. below is the code in my action
return axios
.get("/backUp").then((response) => {
const url = window.URL.createObjectURL(new Blob([response.data],{type: "application/octet-stream"}));
const link = document.createElement('a');
link.href = url;
link.setAttribute("download", "BackUp.db");
document.body.appendChild(link);
link.click();
dispatch(fileDownloadActionComplete(response.data));
})