diff options
author | Chocobozzz <me@florianbigard.com> | 2023-01-09 09:44:00 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2023-01-09 09:44:00 +0100 |
commit | 0a8a79552cf59c800011c9f63eaa8658230acddc (patch) | |
tree | e797870a2660ca342722eaea426ed8a588a640b9 /server/helpers/custom-validators/video-captions.ts | |
parent | cde3d90ded5debb24281a444eabb720b721e5600 (diff) | |
parent | 2570fd9c1c879d1a543fb0dff1e7cfb036234d11 (diff) | |
download | PeerTube-0a8a79552cf59c800011c9f63eaa8658230acddc.tar.gz PeerTube-0a8a79552cf59c800011c9f63eaa8658230acddc.tar.zst PeerTube-0a8a79552cf59c800011c9f63eaa8658230acddc.zip |
Merge branch 'feature/SO035' into develop
Diffstat (limited to 'server/helpers/custom-validators/video-captions.ts')
-rw-r--r-- | server/helpers/custom-validators/video-captions.ts | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/server/helpers/custom-validators/video-captions.ts b/server/helpers/custom-validators/video-captions.ts index 59ba005fe..d5b09ea03 100644 --- a/server/helpers/custom-validators/video-captions.ts +++ b/server/helpers/custom-validators/video-captions.ts | |||
@@ -8,10 +8,11 @@ function isVideoCaptionLanguageValid (value: any) { | |||
8 | return exists(value) && VIDEO_LANGUAGES[value] !== undefined | 8 | return exists(value) && VIDEO_LANGUAGES[value] !== undefined |
9 | } | 9 | } |
10 | 10 | ||
11 | const videoCaptionTypesRegex = Object.keys(MIMETYPES.VIDEO_CAPTIONS.MIMETYPE_EXT) | 11 | // MacOS sends application/octet-stream |
12 | .concat([ 'application/octet-stream' ]) // MacOS sends application/octet-stream | 12 | const videoCaptionTypesRegex = [ ...Object.keys(MIMETYPES.VIDEO_CAPTIONS.MIMETYPE_EXT), 'application/octet-stream' ] |
13 | .map(m => `(${m})`) | 13 | .map(m => `(${m})`) |
14 | .join('|') | 14 | .join('|') |
15 | |||
15 | function isVideoCaptionFile (files: UploadFilesForCheck, field: string) { | 16 | function isVideoCaptionFile (files: UploadFilesForCheck, field: string) { |
16 | return isFileValid({ | 17 | return isFileValid({ |
17 | files, | 18 | files, |