From c6c0fa6cd8fe8f752463d8982c3dbcd448739c4e Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 17 Sep 2020 09:20:52 +0200 Subject: Live streaming implementation first step --- server/helpers/custom-validators/videos.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'server/helpers/custom-validators/videos.ts') 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 { VIDEO_LICENCES, VIDEO_PRIVACIES, VIDEO_RATE_TYPES, - VIDEO_STATES + VIDEO_STATES, + VIDEO_LIVE } from '../../initializers/constants' import { exists, isArray, isDateValid, isFileValid } from './misc' import * as magnetUtil from 'magnet-uri' @@ -77,7 +78,7 @@ function isVideoRatingTypeValid (value: string) { } function isVideoFileExtnameValid (value: string) { - return exists(value) && MIMETYPES.VIDEO.EXT_MIMETYPE[value] !== undefined + return exists(value) && (value === VIDEO_LIVE.EXTENSION || MIMETYPES.VIDEO.EXT_MIMETYPE[value] !== undefined) } function isVideoFile (files: { [ fieldname: string ]: Express.Multer.File[] } | Express.Multer.File[]) { -- cgit v1.2.3