mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 19:42:24 +02:00
Fix torrent import on windows
This commit is contained in:
parent
be6343d26e
commit
edaf5b862a
2 changed files with 7 additions and 5 deletions
|
@ -5,10 +5,10 @@ function isVideoCaptionLanguageValid (value: any) {
|
|||
return exists(value) && VIDEO_LANGUAGES[value] !== undefined
|
||||
}
|
||||
|
||||
const videoCaptionTypes = Object.keys(MIMETYPES.VIDEO_CAPTIONS.MIMETYPE_EXT)
|
||||
.concat([ 'application/octet-stream' ]) // MacOS sends application/octet-stream ><
|
||||
const videoCaptionTypesRegex = Object.keys(MIMETYPES.VIDEO_CAPTIONS.MIMETYPE_EXT)
|
||||
.concat([ 'application/octet-stream' ]) // MacOS sends application/octet-stream
|
||||
.map(m => `(${m})`)
|
||||
const videoCaptionTypesRegex = videoCaptionTypes.join('|')
|
||||
.join('|')
|
||||
function isVideoCaptionFile (files: { [ fieldname: string ]: Express.Multer.File[] } | Express.Multer.File[], field: string) {
|
||||
return isFileValid(files, videoCaptionTypesRegex, field, CONSTRAINTS_FIELDS.VIDEO_CAPTIONS.CAPTION_FILE.FILE_SIZE.max)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue