From 7f6b6932fb07f1458202db72dad19218ec92d7f2 Mon Sep 17 00:00:00 2001 From: bingus_violet Date: Sun, 11 Aug 2024 10:56:52 -0500 Subject: [PATCH] Fix file naming not working outside of firefox --- downloader.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/downloader.js b/downloader.js index a0a235c..977457c 100644 --- a/downloader.js +++ b/downloader.js @@ -31,7 +31,7 @@ expressManager.app.get("/download", async (req, res) => { var info = await ytdl.getInfo(url) - res.setHeader("Content-Disposition", `attachment; filename*="${info.videoDetails.title.replace(/[^a-z0-9 ]/gi, '')}.${format}"`) + res.setHeader("Content-Disposition", `attachment; filename="${info.videoDetails.title.replace(/[^a-z0-9 ]/gi, '')}.${format}"`) var audioFormat = ytdl.chooseFormat(info.formats, { filter: (format) => { return format.hasAudio && !format.hasVideo