From cdc7c1893a00131373074f0cb67620e01a97526b Mon Sep 17 00:00:00 2001 From: Ardis Lu Date: Fri, 17 Dec 2021 23:57:23 -0800 Subject: [PATCH] Use the file name property instead of overriding --- query-to-db.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/query-to-db.html b/query-to-db.html index 78f77c7..d44c958 100644 --- a/query-to-db.html +++ b/query-to-db.html @@ -110,10 +110,10 @@ google.script.run.withSuccessHandler(query => { db.run(query); const buffer = db.export(); - file = new File([buffer], 'database.sqlite3', { type: 'application/vnd.sqlite3' }); + file = new File([buffer], `${Date.now()}.sqlite3`, { type: 'application/vnd.sqlite3' }); downloadLink.href = URL.createObjectURL(file); - downloadLink.download = `${Date.now()}.sqlite3`; + downloadLink.download = file.name; setState('downloadReady'); }).generateDatabaseQuery(); }); -- 2.47.3