Fix file naming not working outside of firefox

This commit is contained in:
bingus_violet 2024-08-11 10:56:52 -05:00
parent 374e1f7036
commit 7f6b6932fb

View file

@ -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