1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-06 03:50:26 +02:00

Add content length when downloading a muxed file

This commit is contained in:
Chocobozzz 2025-02-14 08:54:57 +01:00
parent a4d9c461bb
commit a2c601d3e6
No known key found for this signature in database
GPG key ID: 583A612D890159BE

View file

@ -252,6 +252,7 @@ async function downloadGeneratedVideoFile (req: express.Request, res: express.Re
: maxResolutionFile.extname
const downloadFilename = buildDownloadFilename({ video, extname })
res.setHeader('Content-Length', videoFiles.reduce((p, f) => p + f.size, 0))
res.setHeader('Content-disposition', `attachment; filename="${encodeURI(downloadFilename)}`)
await muxToMergeVideoFiles({ video, videoFiles, output: res })