diff options
Diffstat (limited to 'server/middlewares/validators/videos/video-playlists.ts')
-rw-r--r-- | server/middlewares/validators/videos/video-playlists.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/middlewares/validators/videos/video-playlists.ts b/server/middlewares/validators/videos/video-playlists.ts index f5fee845e..241b9ed7b 100644 --- a/server/middlewares/validators/videos/video-playlists.ts +++ b/server/middlewares/validators/videos/video-playlists.ts | |||
@@ -27,7 +27,7 @@ import { | |||
27 | isVideoPlaylistTimestampValid, | 27 | isVideoPlaylistTimestampValid, |
28 | isVideoPlaylistTypeValid | 28 | isVideoPlaylistTypeValid |
29 | } from '../../../helpers/custom-validators/video-playlists' | 29 | } from '../../../helpers/custom-validators/video-playlists' |
30 | import { isVideoImage } from '../../../helpers/custom-validators/videos' | 30 | import { isVideoImageValid } from '../../../helpers/custom-validators/videos' |
31 | import { cleanUpReqFiles } from '../../../helpers/express-utils' | 31 | import { cleanUpReqFiles } from '../../../helpers/express-utils' |
32 | import { logger } from '../../../helpers/logger' | 32 | import { logger } from '../../../helpers/logger' |
33 | import { CONSTRAINTS_FIELDS } from '../../../initializers/constants' | 33 | import { CONSTRAINTS_FIELDS } from '../../../initializers/constants' |
@@ -390,7 +390,7 @@ export { | |||
390 | function getCommonPlaylistEditAttributes () { | 390 | function getCommonPlaylistEditAttributes () { |
391 | return [ | 391 | return [ |
392 | body('thumbnailfile') | 392 | body('thumbnailfile') |
393 | .custom((value, { req }) => isVideoImage(req.files, 'thumbnailfile')) | 393 | .custom((value, { req }) => isVideoImageValid(req.files, 'thumbnailfile')) |
394 | .withMessage( | 394 | .withMessage( |
395 | 'This thumbnail file is not supported or too large. Please, make sure it is of the following type: ' + | 395 | 'This thumbnail file is not supported or too large. Please, make sure it is of the following type: ' + |
396 | CONSTRAINTS_FIELDS.VIDEO_PLAYLISTS.IMAGE.EXTNAME.join(', ') | 396 | CONSTRAINTS_FIELDS.VIDEO_PLAYLISTS.IMAGE.EXTNAME.join(', ') |