Remove / in download filename

pull/6252/head
Chocobozzz 2024-02-16 10:35:21 +01:00
parent cb23087ff5
commit a40981fc30
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 2 additions and 1 deletions

View File

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