Fix file naming not working outside of firefox
This commit is contained in:
parent
374e1f7036
commit
7f6b6932fb
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue