aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/custom-validators/videos.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/helpers/custom-validators/videos.ts')
-rw-r--r--server/helpers/custom-validators/videos.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/server/helpers/custom-validators/videos.ts b/server/helpers/custom-validators/videos.ts
index 8b309ae42..87966798f 100644
--- a/server/helpers/custom-validators/videos.ts
+++ b/server/helpers/custom-validators/videos.ts
@@ -11,7 +11,7 @@ import {
11 VIDEO_STATES, 11 VIDEO_STATES,
12 VIDEO_LIVE 12 VIDEO_LIVE
13} from '../../initializers/constants' 13} from '../../initializers/constants'
14import { exists, isArray, isDateValid, isFileValid } from './misc' 14import { exists, isArray, isDateValid, isFileMimeTypeValid, isFileValid } from './misc'
15import * as magnetUtil from 'magnet-uri' 15import * as magnetUtil from 'magnet-uri'
16 16
17const VIDEOS_CONSTRAINTS_FIELDS = CONSTRAINTS_FIELDS.VIDEOS 17const VIDEOS_CONSTRAINTS_FIELDS = CONSTRAINTS_FIELDS.VIDEOS
@@ -81,8 +81,8 @@ function isVideoFileExtnameValid (value: string) {
81 return exists(value) && (value === VIDEO_LIVE.EXTENSION || MIMETYPES.VIDEO.EXT_MIMETYPE[value] !== undefined) 81 return exists(value) && (value === VIDEO_LIVE.EXTENSION || MIMETYPES.VIDEO.EXT_MIMETYPE[value] !== undefined)
82} 82}
83 83
84function isVideoFile (files: { [ fieldname: string ]: Express.Multer.File[] } | Express.Multer.File[]) { 84function isVideoFileMimeTypeValid (files: { [ fieldname: string ]: Express.Multer.File[] } | Express.Multer.File[]) {
85 return isFileValid(files, MIMETYPES.VIDEO.MIMETYPES_REGEX, 'videofile', null) 85 return isFileMimeTypeValid(files, MIMETYPES.VIDEO.MIMETYPES_REGEX, 'videofile')
86} 86}
87 87
88const videoImageTypes = CONSTRAINTS_FIELDS.VIDEOS.IMAGE.EXTNAME 88const videoImageTypes = CONSTRAINTS_FIELDS.VIDEOS.IMAGE.EXTNAME
@@ -143,12 +143,12 @@ export {
143 isVideoFPSResolutionValid, 143 isVideoFPSResolutionValid,
144 isScheduleVideoUpdatePrivacyValid, 144 isScheduleVideoUpdatePrivacyValid,
145 isVideoOriginallyPublishedAtValid, 145 isVideoOriginallyPublishedAtValid,
146 isVideoFile,
147 isVideoMagnetUriValid, 146 isVideoMagnetUriValid,
148 isVideoStateValid, 147 isVideoStateValid,
149 isVideoViewsValid, 148 isVideoViewsValid,
150 isVideoRatingTypeValid, 149 isVideoRatingTypeValid,
151 isVideoFileExtnameValid, 150 isVideoFileExtnameValid,
151 isVideoFileMimeTypeValid,
152 isVideoDurationValid, 152 isVideoDurationValid,
153 isVideoTagValid, 153 isVideoTagValid,
154 isVideoPrivacyValid, 154 isVideoPrivacyValid,