From: Ardis Lu Date: Sat, 18 Dec 2021 07:57:23 +0000 (-0800) Subject: Use the file name property instead of overriding X-Git-Url: https://git.ardis.lu/?a=commitdiff_plain;h=cdc7c1893a00131373074f0cb67620e01a97526b;p=sheets-db Use the file name property instead of overriding --- 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(); });