2
0
mirror of https://github.com/gchq/CyberChef synced 2025-12-15 15:53:30 +00:00

Download filenames now persist

This commit is contained in:
n1474335
2017-12-27 02:01:17 +00:00
parent bad0816115
commit a0aa363203
2 changed files with 4 additions and 4 deletions

View File

@@ -135,10 +135,10 @@ OutputWaiter.prototype.closeFile = function() {
* Handler for file download events.
*/
OutputWaiter.prototype.downloadFile = function() {
const filename = window.prompt("Please enter a filename:", "download.dat");
const file = new File([this.dishBuffer], filename);
this.filename = window.prompt("Please enter a filename:", this.filename || "download.dat");
const file = new File([this.dishBuffer], this.filename);
if (filename) FileSaver.saveAs(file, filename, false);
if (this.filename) FileSaver.saveAs(file, this.filename, false);
};