diff options
Diffstat (limited to 'server/helpers/custom-validators/videos.ts')
-rw-r--r-- | server/helpers/custom-validators/videos.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/server/helpers/custom-validators/videos.ts b/server/helpers/custom-validators/videos.ts index 40fecc09b..e99992236 100644 --- a/server/helpers/custom-validators/videos.ts +++ b/server/helpers/custom-validators/videos.ts | |||
@@ -8,7 +8,8 @@ import { | |||
8 | VIDEO_LICENCES, | 8 | VIDEO_LICENCES, |
9 | VIDEO_PRIVACIES, | 9 | VIDEO_PRIVACIES, |
10 | VIDEO_RATE_TYPES, | 10 | VIDEO_RATE_TYPES, |
11 | VIDEO_STATES | 11 | VIDEO_STATES, |
12 | VIDEO_LIVE | ||
12 | } from '../../initializers/constants' | 13 | } from '../../initializers/constants' |
13 | import { exists, isArray, isDateValid, isFileValid } from './misc' | 14 | import { exists, isArray, isDateValid, isFileValid } from './misc' |
14 | import * as magnetUtil from 'magnet-uri' | 15 | import * as magnetUtil from 'magnet-uri' |
@@ -77,7 +78,7 @@ function isVideoRatingTypeValid (value: string) { | |||
77 | } | 78 | } |
78 | 79 | ||
79 | function isVideoFileExtnameValid (value: string) { | 80 | function isVideoFileExtnameValid (value: string) { |
80 | return exists(value) && MIMETYPES.VIDEO.EXT_MIMETYPE[value] !== undefined | 81 | return exists(value) && (value === VIDEO_LIVE.EXTENSION || MIMETYPES.VIDEO.EXT_MIMETYPE[value] !== undefined) |
81 | } | 82 | } |
82 | 83 | ||
83 | function isVideoFile (files: { [ fieldname: string ]: Express.Multer.File[] } | Express.Multer.File[]) { | 84 | function isVideoFile (files: { [ fieldname: string ]: Express.Multer.File[] } | Express.Multer.File[]) { |