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:
parent
a4d9c461bb
commit
a2c601d3e6
1 changed files with 1 additions and 0 deletions
|
@ -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 })
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue