I'm currently utilizing FileSaver.js to display an object array on the client side using HTML/Typescript.
var blob = new Blob([JSON.stringify( marray)], {type: "text/plain;charset=utf-8"});
saveAs(blob, "Data.txt");
While it's functioning correctly, the issue lies in the fact that it automatically downloads to the default download folder. I'm looking to specify a file path along with its name. Any suggestions? Or a different approach to achieve this task. The use of fs
is unsuccessful in this scenario, as it doesn't recognize fs and triggers the error
fs.writefilesync is not a function