diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/middlewares/validators/videos.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/server/middlewares/validators/videos.ts b/server/middlewares/validators/videos.ts index deed07524..f63348e66 100644 --- a/server/middlewares/validators/videos.ts +++ b/server/middlewares/validators/videos.ts | |||
@@ -23,7 +23,10 @@ import { | |||
23 | } from '../../helpers' | 23 | } from '../../helpers' |
24 | 24 | ||
25 | const videosAddValidator = [ | 25 | const videosAddValidator = [ |
26 | body('videofile').custom((value, { req }) => isVideoFile(req.files)).withMessage('Should have a valid file'), | 26 | body('videofile').custom((value, { req }) => isVideoFile(req.files)).withMessage( |
27 | 'This file is not supported. Are you sure it is of the following type : ' | ||
28 | + CONSTRAINTS_FIELDS.VIDEOS.EXTNAME | ||
29 | ), | ||
27 | body('name').custom(isVideoNameValid).withMessage('Should have a valid name'), | 30 | body('name').custom(isVideoNameValid).withMessage('Should have a valid name'), |
28 | body('category').custom(isVideoCategoryValid).withMessage('Should have a valid category'), | 31 | body('category').custom(isVideoCategoryValid).withMessage('Should have a valid category'), |
29 | body('licence').custom(isVideoLicenceValid).withMessage('Should have a valid licence'), | 32 | body('licence').custom(isVideoLicenceValid).withMessage('Should have a valid licence'), |