I am using Angular and FileSaver to save a file but I want to specify a name to the downloaded file
this._UsersService.downloadReport(id).subscribe(data => {
FileSaver.saveAs(data);
});
I am using Angular and FileSaver to save a file but I want to specify a name to the downloaded file
this._UsersService.downloadReport(id).subscribe(data => {
FileSaver.saveAs(data);
});
Not too familiar with it, but wouldn't you just add a file name option after your data?
ex: FileSaver.saveAs(data, "my filename")
?
https://github.com/eligrey/FileSaver.js/
Edit: perhaps another relevant SO post: How to use filesaver.js