Does anyone have experience with downloading content in a txt file? Here is the code snippet I'm working with:
download() {
let content = "Sample text";
saveAs(new Blob([content], { type: 'text/plain'}), 'sample.txt');
I am using the file-saver library for this task. Everything is functioning properly, but I would like to implement a browser popup that allows the user to input their desired file name, choose the download directory, and potentially override existing files before initiating the download.
If anyone can provide assistance or guidance on how to achieve this functionality, it would be greatly appreciated. Thank you!