aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/custom-validators/video-captions.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-12-30 10:12:20 +0100
committerChocobozzz <me@florianbigard.com>2023-01-04 11:41:29 +0100
commit60b880acdfa85eab5c9ec09ba1283f82ae58ec85 (patch)
tree3c89db53ea9a00e61121d76672bd931eb6d1a84a /server/helpers/custom-validators/video-captions.ts
parent7e0c26066a5c59af742ae56bddaff9635debe034 (diff)
downloadPeerTube-60b880acdfa85eab5c9ec09ba1283f82ae58ec85.tar.gz
PeerTube-60b880acdfa85eab5c9ec09ba1283f82ae58ec85.tar.zst
PeerTube-60b880acdfa85eab5c9ec09ba1283f82ae58ec85.zip
External auth can update user on login
Diffstat (limited to 'server/helpers/custom-validators/video-captions.ts')
-rw-r--r--server/helpers/custom-validators/video-captions.ts9
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
11const videoCaptionTypesRegex = Object.keys(MIMETYPES.VIDEO_CAPTIONS.MIMETYPE_EXT) 11// MacOS sends application/octet-stream
12 .concat([ 'application/octet-stream' ]) // MacOS sends application/octet-stream 12const videoCaptionTypesRegex = [ ...Object.keys(MIMETYPES.VIDEO_CAPTIONS.MIMETYPE_EXT), 'application/octet-stream' ]
13 .map(m => `(${m})`) 13 .map(m => `(${m})`)
14 .join('|') 14 .join('|')
15
15function isVideoCaptionFile (files: UploadFilesForCheck, field: string) { 16function isVideoCaptionFile (files: UploadFilesForCheck, field: string) {
16 return isFileValid({ 17 return isFileValid({
17 files, 18 files,