mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 18:29:27 +02:00
Implement remote runner jobs in server
Move ffmpeg functions to @shared
This commit is contained in:
parent
6bcb854cde
commit
0c9668f779
168 changed files with 6907 additions and 2803 deletions
|
@ -15,6 +15,10 @@ function isSafePath (p: string) {
|
|||
})
|
||||
}
|
||||
|
||||
function isSafeFilename (filename: string, extension: string) {
|
||||
return typeof filename === 'string' && !!filename.match(new RegExp(`^[a-z0-9-]+\\.${extension}$`))
|
||||
}
|
||||
|
||||
function isSafePeerTubeFilenameWithoutExtension (filename: string) {
|
||||
return filename.match(/^[a-z0-9-]+$/)
|
||||
}
|
||||
|
@ -177,5 +181,6 @@ export {
|
|||
toIntArray,
|
||||
isFileValid,
|
||||
isSafePeerTubeFilenameWithoutExtension,
|
||||
isSafeFilename,
|
||||
checkMimetypeRegex
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue