diff options
author | Chocobozzz <me@florianbigard.com> | 2019-07-23 10:40:39 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2019-07-24 10:58:16 +0200 |
commit | 3e753302d8c911b59971c16a8018df0e1ab78465 (patch) | |
tree | efce7ece3273589228c5c948ea6757b2bdf65429 /server/middlewares/validators/videos | |
parent | a8b666e9f1ed002230869606308749614390c82f (diff) | |
download | PeerTube-3e753302d8c911b59971c16a8018df0e1ab78465.tar.gz PeerTube-3e753302d8c911b59971c16a8018df0e1ab78465.tar.zst PeerTube-3e753302d8c911b59971c16a8018df0e1ab78465.zip |
Refactor middleware helpers
Diffstat (limited to 'server/middlewares/validators/videos')
11 files changed, 17 insertions, 24 deletions
diff --git a/server/middlewares/validators/videos/video-abuses.ts b/server/middlewares/validators/videos/video-abuses.ts index d1910a992..e176e01af 100644 --- a/server/middlewares/validators/videos/video-abuses.ts +++ b/server/middlewares/validators/videos/video-abuses.ts | |||
@@ -2,15 +2,14 @@ import * as express from 'express' | |||
2 | import 'express-validator' | 2 | import 'express-validator' |
3 | import { body, param } from 'express-validator/check' | 3 | import { body, param } from 'express-validator/check' |
4 | import { isIdOrUUIDValid, isIdValid } from '../../../helpers/custom-validators/misc' | 4 | import { isIdOrUUIDValid, isIdValid } from '../../../helpers/custom-validators/misc' |
5 | import { doesVideoExist } from '../../../helpers/custom-validators/videos' | ||
6 | import { logger } from '../../../helpers/logger' | 5 | import { logger } from '../../../helpers/logger' |
7 | import { areValidationErrors } from '../utils' | 6 | import { areValidationErrors } from '../utils' |
8 | import { | 7 | import { |
9 | doesVideoAbuseExist, | ||
10 | isVideoAbuseModerationCommentValid, | 8 | isVideoAbuseModerationCommentValid, |
11 | isVideoAbuseReasonValid, | 9 | isVideoAbuseReasonValid, |
12 | isVideoAbuseStateValid | 10 | isVideoAbuseStateValid |
13 | } from '../../../helpers/custom-validators/video-abuses' | 11 | } from '../../../helpers/custom-validators/video-abuses' |
12 | import { doesVideoAbuseExist, doesVideoExist } from '../../../helpers/middlewares' | ||
14 | 13 | ||
15 | const videoAbuseReportValidator = [ | 14 | const videoAbuseReportValidator = [ |
16 | param('videoId').custom(isIdOrUUIDValid).not().isEmpty().withMessage('Should have a valid videoId'), | 15 | param('videoId').custom(isIdOrUUIDValid).not().isEmpty().withMessage('Should have a valid videoId'), |
diff --git a/server/middlewares/validators/videos/video-blacklist.ts b/server/middlewares/validators/videos/video-blacklist.ts index 1d7ddb2e3..db59427c7 100644 --- a/server/middlewares/validators/videos/video-blacklist.ts +++ b/server/middlewares/validators/videos/video-blacklist.ts | |||
@@ -1,14 +1,10 @@ | |||
1 | import * as express from 'express' | 1 | import * as express from 'express' |
2 | import { body, param, query } from 'express-validator/check' | 2 | import { body, param, query } from 'express-validator/check' |
3 | import { isBooleanValid, isIdOrUUIDValid } from '../../../helpers/custom-validators/misc' | 3 | import { isBooleanValid, isIdOrUUIDValid } from '../../../helpers/custom-validators/misc' |
4 | import { doesVideoExist } from '../../../helpers/custom-validators/videos' | ||
5 | import { logger } from '../../../helpers/logger' | 4 | import { logger } from '../../../helpers/logger' |
6 | import { areValidationErrors } from '../utils' | 5 | import { areValidationErrors } from '../utils' |
7 | import { | 6 | import { isVideoBlacklistReasonValid, isVideoBlacklistTypeValid } from '../../../helpers/custom-validators/video-blacklist' |
8 | doesVideoBlacklistExist, | 7 | import { doesVideoBlacklistExist, doesVideoExist } from '../../../helpers/middlewares' |
9 | isVideoBlacklistReasonValid, | ||
10 | isVideoBlacklistTypeValid | ||
11 | } from '../../../helpers/custom-validators/video-blacklist' | ||
12 | 8 | ||
13 | const videosBlacklistRemoveValidator = [ | 9 | const videosBlacklistRemoveValidator = [ |
14 | param('videoId').custom(isIdOrUUIDValid).not().isEmpty().withMessage('Should have a valid videoId'), | 10 | param('videoId').custom(isIdOrUUIDValid).not().isEmpty().withMessage('Should have a valid videoId'), |
diff --git a/server/middlewares/validators/videos/video-captions.ts b/server/middlewares/validators/videos/video-captions.ts index d857ac3ec..f8739e27f 100644 --- a/server/middlewares/validators/videos/video-captions.ts +++ b/server/middlewares/validators/videos/video-captions.ts | |||
@@ -1,13 +1,13 @@ | |||
1 | import * as express from 'express' | 1 | import * as express from 'express' |
2 | import { areValidationErrors } from '../utils' | 2 | import { areValidationErrors } from '../utils' |
3 | import { checkUserCanManageVideo, doesVideoExist } from '../../../helpers/custom-validators/videos' | ||
4 | import { isIdOrUUIDValid } from '../../../helpers/custom-validators/misc' | 3 | import { isIdOrUUIDValid } from '../../../helpers/custom-validators/misc' |
5 | import { body, param } from 'express-validator/check' | 4 | import { body, param } from 'express-validator/check' |
6 | import { CONSTRAINTS_FIELDS } from '../../../initializers/constants' | 5 | import { CONSTRAINTS_FIELDS } from '../../../initializers/constants' |
7 | import { UserRight } from '../../../../shared' | 6 | import { UserRight } from '../../../../shared' |
8 | import { logger } from '../../../helpers/logger' | 7 | import { logger } from '../../../helpers/logger' |
9 | import { doesVideoCaptionExist, isVideoCaptionFile, isVideoCaptionLanguageValid } from '../../../helpers/custom-validators/video-captions' | 8 | import { isVideoCaptionFile, isVideoCaptionLanguageValid } from '../../../helpers/custom-validators/video-captions' |
10 | import { cleanUpReqFiles } from '../../../helpers/express-utils' | 9 | import { cleanUpReqFiles } from '../../../helpers/express-utils' |
10 | import { checkUserCanManageVideo, doesVideoCaptionExist, doesVideoExist } from '../../../helpers/middlewares' | ||
11 | 11 | ||
12 | const addVideoCaptionValidator = [ | 12 | const addVideoCaptionValidator = [ |
13 | param('videoId').custom(isIdOrUUIDValid).not().isEmpty().withMessage('Should have a valid video id'), | 13 | param('videoId').custom(isIdOrUUIDValid).not().isEmpty().withMessage('Should have a valid video id'), |
diff --git a/server/middlewares/validators/videos/video-channels.ts b/server/middlewares/validators/videos/video-channels.ts index f5a59cacb..c1065b898 100644 --- a/server/middlewares/validators/videos/video-channels.ts +++ b/server/middlewares/validators/videos/video-channels.ts | |||
@@ -2,8 +2,6 @@ import * as express from 'express' | |||
2 | import { body, param } from 'express-validator/check' | 2 | import { body, param } from 'express-validator/check' |
3 | import { UserRight } from '../../../../shared' | 3 | import { UserRight } from '../../../../shared' |
4 | import { | 4 | import { |
5 | doesLocalVideoChannelNameExist, | ||
6 | doesVideoChannelNameWithHostExist, | ||
7 | isVideoChannelDescriptionValid, | 5 | isVideoChannelDescriptionValid, |
8 | isVideoChannelNameValid, | 6 | isVideoChannelNameValid, |
9 | isVideoChannelSupportValid | 7 | isVideoChannelSupportValid |
@@ -15,6 +13,7 @@ import { areValidationErrors } from '../utils' | |||
15 | import { isActorPreferredUsernameValid } from '../../../helpers/custom-validators/activitypub/actor' | 13 | import { isActorPreferredUsernameValid } from '../../../helpers/custom-validators/activitypub/actor' |
16 | import { ActorModel } from '../../../models/activitypub/actor' | 14 | import { ActorModel } from '../../../models/activitypub/actor' |
17 | import { isBooleanValid } from '../../../helpers/custom-validators/misc' | 15 | import { isBooleanValid } from '../../../helpers/custom-validators/misc' |
16 | import { doesLocalVideoChannelNameExist, doesVideoChannelNameWithHostExist } from '../../../helpers/middlewares' | ||
18 | 17 | ||
19 | const videoChannelsAddValidator = [ | 18 | const videoChannelsAddValidator = [ |
20 | body('name').custom(isActorPreferredUsernameValid).withMessage('Should have a valid channel name'), | 19 | body('name').custom(isActorPreferredUsernameValid).withMessage('Should have a valid channel name'), |
diff --git a/server/middlewares/validators/videos/video-comments.ts b/server/middlewares/validators/videos/video-comments.ts index 6b8e2f318..1e3e42833 100644 --- a/server/middlewares/validators/videos/video-comments.ts +++ b/server/middlewares/validators/videos/video-comments.ts | |||
@@ -3,7 +3,6 @@ import { body, param } from 'express-validator/check' | |||
3 | import { UserRight } from '../../../../shared' | 3 | import { UserRight } from '../../../../shared' |
4 | import { isIdOrUUIDValid, isIdValid } from '../../../helpers/custom-validators/misc' | 4 | import { isIdOrUUIDValid, isIdValid } from '../../../helpers/custom-validators/misc' |
5 | import { isValidVideoCommentText } from '../../../helpers/custom-validators/video-comments' | 5 | import { isValidVideoCommentText } from '../../../helpers/custom-validators/video-comments' |
6 | import { doesVideoExist } from '../../../helpers/custom-validators/videos' | ||
7 | import { logger } from '../../../helpers/logger' | 6 | import { logger } from '../../../helpers/logger' |
8 | import { UserModel } from '../../../models/account/user' | 7 | import { UserModel } from '../../../models/account/user' |
9 | import { VideoModel } from '../../../models/video/video' | 8 | import { VideoModel } from '../../../models/video/video' |
@@ -11,6 +10,7 @@ import { VideoCommentModel } from '../../../models/video/video-comment' | |||
11 | import { areValidationErrors } from '../utils' | 10 | import { areValidationErrors } from '../utils' |
12 | import { Hooks } from '../../../lib/plugins/hooks' | 11 | import { Hooks } from '../../../lib/plugins/hooks' |
13 | import { isLocalVideoThreadAccepted, isLocalVideoCommentReplyAccepted, AcceptResult } from '../../../lib/moderation' | 12 | import { isLocalVideoThreadAccepted, isLocalVideoCommentReplyAccepted, AcceptResult } from '../../../lib/moderation' |
13 | import { doesVideoExist } from '../../../helpers/middlewares' | ||
14 | 14 | ||
15 | const listVideoCommentThreadsValidator = [ | 15 | const listVideoCommentThreadsValidator = [ |
16 | param('videoId').custom(isIdOrUUIDValid).not().isEmpty().withMessage('Should have a valid videoId'), | 16 | param('videoId').custom(isIdOrUUIDValid).not().isEmpty().withMessage('Should have a valid videoId'), |
diff --git a/server/middlewares/validators/videos/video-imports.ts b/server/middlewares/validators/videos/video-imports.ts index 452084a7c..8b0dd8960 100644 --- a/server/middlewares/validators/videos/video-imports.ts +++ b/server/middlewares/validators/videos/video-imports.ts | |||
@@ -6,9 +6,10 @@ import { areValidationErrors } from '../utils' | |||
6 | import { getCommonVideoEditAttributes } from './videos' | 6 | import { getCommonVideoEditAttributes } from './videos' |
7 | import { isVideoImportTargetUrlValid, isVideoImportTorrentFile } from '../../../helpers/custom-validators/video-imports' | 7 | import { isVideoImportTargetUrlValid, isVideoImportTorrentFile } from '../../../helpers/custom-validators/video-imports' |
8 | import { cleanUpReqFiles } from '../../../helpers/express-utils' | 8 | import { cleanUpReqFiles } from '../../../helpers/express-utils' |
9 | import { doesVideoChannelOfAccountExist, isVideoMagnetUriValid, isVideoNameValid } from '../../../helpers/custom-validators/videos' | 9 | import { isVideoMagnetUriValid, isVideoNameValid } from '../../../helpers/custom-validators/videos' |
10 | import { CONFIG } from '../../../initializers/config' | 10 | import { CONFIG } from '../../../initializers/config' |
11 | import { CONSTRAINTS_FIELDS } from '../../../initializers/constants' | 11 | import { CONSTRAINTS_FIELDS } from '../../../initializers/constants' |
12 | import { doesVideoChannelOfAccountExist } from '../../../helpers/middlewares' | ||
12 | 13 | ||
13 | const videoImportAddValidator = getCommonVideoEditAttributes().concat([ | 14 | const videoImportAddValidator = getCommonVideoEditAttributes().concat([ |
14 | body('channelId') | 15 | body('channelId') |
diff --git a/server/middlewares/validators/videos/video-playlists.ts b/server/middlewares/validators/videos/video-playlists.ts index 9c88dd291..638122a2e 100644 --- a/server/middlewares/validators/videos/video-playlists.ts +++ b/server/middlewares/validators/videos/video-playlists.ts | |||
@@ -4,11 +4,10 @@ import { UserRight, VideoPlaylistCreate, VideoPlaylistUpdate } from '../../../.. | |||
4 | import { logger } from '../../../helpers/logger' | 4 | import { logger } from '../../../helpers/logger' |
5 | import { UserModel } from '../../../models/account/user' | 5 | import { UserModel } from '../../../models/account/user' |
6 | import { areValidationErrors } from '../utils' | 6 | import { areValidationErrors } from '../utils' |
7 | import { doesVideoExist, isVideoImage } from '../../../helpers/custom-validators/videos' | 7 | import { isVideoImage } from '../../../helpers/custom-validators/videos' |
8 | import { CONSTRAINTS_FIELDS } from '../../../initializers/constants' | 8 | import { CONSTRAINTS_FIELDS } from '../../../initializers/constants' |
9 | import { isArrayOf, isIdOrUUIDValid, isIdValid, isUUIDValid, toIntArray, toValueOrNull } from '../../../helpers/custom-validators/misc' | 9 | import { isArrayOf, isIdOrUUIDValid, isIdValid, isUUIDValid, toIntArray, toValueOrNull } from '../../../helpers/custom-validators/misc' |
10 | import { | 10 | import { |
11 | doesVideoPlaylistExist, | ||
12 | isVideoPlaylistDescriptionValid, | 11 | isVideoPlaylistDescriptionValid, |
13 | isVideoPlaylistNameValid, | 12 | isVideoPlaylistNameValid, |
14 | isVideoPlaylistPrivacyValid, | 13 | isVideoPlaylistPrivacyValid, |
@@ -17,11 +16,11 @@ import { | |||
17 | } from '../../../helpers/custom-validators/video-playlists' | 16 | } from '../../../helpers/custom-validators/video-playlists' |
18 | import { VideoPlaylistModel } from '../../../models/video/video-playlist' | 17 | import { VideoPlaylistModel } from '../../../models/video/video-playlist' |
19 | import { cleanUpReqFiles } from '../../../helpers/express-utils' | 18 | import { cleanUpReqFiles } from '../../../helpers/express-utils' |
20 | import { doesVideoChannelIdExist } from '../../../helpers/custom-validators/video-channels' | ||
21 | import { VideoPlaylistElementModel } from '../../../models/video/video-playlist-element' | 19 | import { VideoPlaylistElementModel } from '../../../models/video/video-playlist-element' |
22 | import { authenticatePromiseIfNeeded } from '../../oauth' | 20 | import { authenticatePromiseIfNeeded } from '../../oauth' |
23 | import { VideoPlaylistPrivacy } from '../../../../shared/models/videos/playlist/video-playlist-privacy.model' | 21 | import { VideoPlaylistPrivacy } from '../../../../shared/models/videos/playlist/video-playlist-privacy.model' |
24 | import { VideoPlaylistType } from '../../../../shared/models/videos/playlist/video-playlist-type.model' | 22 | import { VideoPlaylistType } from '../../../../shared/models/videos/playlist/video-playlist-type.model' |
23 | import { doesVideoChannelIdExist, doesVideoExist, doesVideoPlaylistExist } from '../../../helpers/middlewares' | ||
25 | 24 | ||
26 | const videoPlaylistsAddValidator = getCommonPlaylistEditAttributes().concat([ | 25 | const videoPlaylistsAddValidator = getCommonPlaylistEditAttributes().concat([ |
27 | body('displayName') | 26 | body('displayName') |
diff --git a/server/middlewares/validators/videos/video-rates.ts b/server/middlewares/validators/videos/video-rates.ts index 204b4a78d..5bb3f4a51 100644 --- a/server/middlewares/validators/videos/video-rates.ts +++ b/server/middlewares/validators/videos/video-rates.ts | |||
@@ -3,12 +3,13 @@ import 'express-validator' | |||
3 | import { body, param, query } from 'express-validator/check' | 3 | import { body, param, query } from 'express-validator/check' |
4 | import { isIdOrUUIDValid } from '../../../helpers/custom-validators/misc' | 4 | import { isIdOrUUIDValid } from '../../../helpers/custom-validators/misc' |
5 | import { isRatingValid } from '../../../helpers/custom-validators/video-rates' | 5 | import { isRatingValid } from '../../../helpers/custom-validators/video-rates' |
6 | import { doesVideoExist, isVideoRatingTypeValid } from '../../../helpers/custom-validators/videos' | 6 | import { isVideoRatingTypeValid } from '../../../helpers/custom-validators/videos' |
7 | import { logger } from '../../../helpers/logger' | 7 | import { logger } from '../../../helpers/logger' |
8 | import { areValidationErrors } from '../utils' | 8 | import { areValidationErrors } from '../utils' |
9 | import { AccountVideoRateModel } from '../../../models/account/account-video-rate' | 9 | import { AccountVideoRateModel } from '../../../models/account/account-video-rate' |
10 | import { VideoRateType } from '../../../../shared/models/videos' | 10 | import { VideoRateType } from '../../../../shared/models/videos' |
11 | import { isAccountNameValid } from '../../../helpers/custom-validators/accounts' | 11 | import { isAccountNameValid } from '../../../helpers/custom-validators/accounts' |
12 | import { doesVideoExist } from '../../../helpers/middlewares' | ||
12 | 13 | ||
13 | const videoUpdateRateValidator = [ | 14 | const videoUpdateRateValidator = [ |
14 | param('id').custom(isIdOrUUIDValid).not().isEmpty().withMessage('Should have a valid id'), | 15 | param('id').custom(isIdOrUUIDValid).not().isEmpty().withMessage('Should have a valid id'), |
diff --git a/server/middlewares/validators/videos/video-shares.ts b/server/middlewares/validators/videos/video-shares.ts index d5cbdb03e..6f4a1f3e0 100644 --- a/server/middlewares/validators/videos/video-shares.ts +++ b/server/middlewares/validators/videos/video-shares.ts | |||
@@ -2,10 +2,10 @@ import * as express from 'express' | |||
2 | import 'express-validator' | 2 | import 'express-validator' |
3 | import { param } from 'express-validator/check' | 3 | import { param } from 'express-validator/check' |
4 | import { isIdOrUUIDValid, isIdValid } from '../../../helpers/custom-validators/misc' | 4 | import { isIdOrUUIDValid, isIdValid } from '../../../helpers/custom-validators/misc' |
5 | import { doesVideoExist } from '../../../helpers/custom-validators/videos' | ||
6 | import { logger } from '../../../helpers/logger' | 5 | import { logger } from '../../../helpers/logger' |
7 | import { VideoShareModel } from '../../../models/video/video-share' | 6 | import { VideoShareModel } from '../../../models/video/video-share' |
8 | import { areValidationErrors } from '../utils' | 7 | import { areValidationErrors } from '../utils' |
8 | import { doesVideoExist } from '../../../helpers/middlewares' | ||
9 | 9 | ||
10 | const videosShareValidator = [ | 10 | const videosShareValidator = [ |
11 | param('id').custom(isIdOrUUIDValid).not().isEmpty().withMessage('Should have a valid id'), | 11 | param('id').custom(isIdOrUUIDValid).not().isEmpty().withMessage('Should have a valid id'), |
diff --git a/server/middlewares/validators/videos/video-watch.ts b/server/middlewares/validators/videos/video-watch.ts index a3a800d14..a0b530c75 100644 --- a/server/middlewares/validators/videos/video-watch.ts +++ b/server/middlewares/validators/videos/video-watch.ts | |||
@@ -1,9 +1,9 @@ | |||
1 | import { body, param } from 'express-validator/check' | 1 | import { body, param } from 'express-validator/check' |
2 | import * as express from 'express' | 2 | import * as express from 'express' |
3 | import { isIdOrUUIDValid } from '../../../helpers/custom-validators/misc' | 3 | import { isIdOrUUIDValid } from '../../../helpers/custom-validators/misc' |
4 | import { doesVideoExist } from '../../../helpers/custom-validators/videos' | ||
5 | import { areValidationErrors } from '../utils' | 4 | import { areValidationErrors } from '../utils' |
6 | import { logger } from '../../../helpers/logger' | 5 | import { logger } from '../../../helpers/logger' |
6 | import { doesVideoExist } from '../../../helpers/middlewares' | ||
7 | 7 | ||
8 | const videoWatchingValidator = [ | 8 | const videoWatchingValidator = [ |
9 | param('videoId').custom(isIdOrUUIDValid).not().isEmpty().withMessage('Should have a valid id'), | 9 | param('videoId').custom(isIdOrUUIDValid).not().isEmpty().withMessage('Should have a valid id'), |
diff --git a/server/middlewares/validators/videos/videos.ts b/server/middlewares/validators/videos/videos.ts index 5593ede64..8f5e5c95c 100644 --- a/server/middlewares/validators/videos/videos.ts +++ b/server/middlewares/validators/videos/videos.ts | |||
@@ -13,9 +13,6 @@ import { | |||
13 | toValueOrNull | 13 | toValueOrNull |
14 | } from '../../../helpers/custom-validators/misc' | 14 | } from '../../../helpers/custom-validators/misc' |
15 | import { | 15 | import { |
16 | checkUserCanManageVideo, | ||
17 | doesVideoChannelOfAccountExist, | ||
18 | doesVideoExist, | ||
19 | isScheduleVideoUpdatePrivacyValid, | 16 | isScheduleVideoUpdatePrivacyValid, |
20 | isVideoCategoryValid, | 17 | isVideoCategoryValid, |
21 | isVideoDescriptionValid, | 18 | isVideoDescriptionValid, |
@@ -33,7 +30,7 @@ import { | |||
33 | import { getDurationFromVideoFile } from '../../../helpers/ffmpeg-utils' | 30 | import { getDurationFromVideoFile } from '../../../helpers/ffmpeg-utils' |
34 | import { logger } from '../../../helpers/logger' | 31 | import { logger } from '../../../helpers/logger' |
35 | import { CONSTRAINTS_FIELDS } from '../../../initializers/constants' | 32 | import { CONSTRAINTS_FIELDS } from '../../../initializers/constants' |
36 | import { authenticate, authenticatePromiseIfNeeded } from '../../oauth' | 33 | import { authenticatePromiseIfNeeded } from '../../oauth' |
37 | import { areValidationErrors } from '../utils' | 34 | import { areValidationErrors } from '../utils' |
38 | import { cleanUpReqFiles } from '../../../helpers/express-utils' | 35 | import { cleanUpReqFiles } from '../../../helpers/express-utils' |
39 | import { VideoModel } from '../../../models/video/video' | 36 | import { VideoModel } from '../../../models/video/video' |
@@ -46,6 +43,7 @@ import { getServerActor } from '../../../helpers/utils' | |||
46 | import { CONFIG } from '../../../initializers/config' | 43 | import { CONFIG } from '../../../initializers/config' |
47 | import { isLocalVideoAccepted } from '../../../lib/moderation' | 44 | import { isLocalVideoAccepted } from '../../../lib/moderation' |
48 | import { Hooks } from '../../../lib/plugins/hooks' | 45 | import { Hooks } from '../../../lib/plugins/hooks' |
46 | import { checkUserCanManageVideo, doesVideoChannelOfAccountExist, doesVideoExist } from '../../../helpers/middlewares' | ||
49 | 47 | ||
50 | const videosAddValidator = getCommonVideoEditAttributes().concat([ | 48 | const videosAddValidator = getCommonVideoEditAttributes().concat([ |
51 | body('videofile') | 49 | body('videofile') |