mirror of https://github.com/Chocobozzz/PeerTube
Remove / in download filename
parent
cb23087ff5
commit
a40981fc30
|
@ -137,7 +137,8 @@ async function downloadHLSVideoFile (req: express.Request, res: express.Response
|
||||||
|
|
||||||
if (!checkAllowResult(res, allowParameters, allowedResult)) return
|
if (!checkAllowResult(res, allowParameters, allowedResult)) return
|
||||||
|
|
||||||
const downloadFilename = `${video.name}-${videoFile.resolution}p-${streamingPlaylist.getStringType()}${videoFile.extname}`
|
const videoName = video.name.replace(/\//g, '_')
|
||||||
|
const downloadFilename = `${videoName}-${videoFile.resolution}p-${streamingPlaylist.getStringType()}${videoFile.extname}`
|
||||||
|
|
||||||
if (videoFile.storage === VideoStorage.OBJECT_STORAGE) {
|
if (videoFile.storage === VideoStorage.OBJECT_STORAGE) {
|
||||||
return redirectToObjectStorage({ req, res, video, streamingPlaylist, file: videoFile, downloadFilename })
|
return redirectToObjectStorage({ req, res, video, streamingPlaylist, file: videoFile, downloadFilename })
|
||||||
|
|
Loading…
Reference in New Issue