Skip to content

Commit

Permalink
Remove / in download filename
Browse files Browse the repository at this point in the history
  • Loading branch information
Chocobozzz committed Feb 16, 2024
1 parent cb23087 commit a40981f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/core/controllers/download.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ async function downloadHLSVideoFile (req: express.Request, res: express.Response

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) {
return redirectToObjectStorage({ req, res, video, streamingPlaylist, file: videoFile, downloadFilename })
Expand Down

0 comments on commit a40981f

Please sign in to comment.