X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=middlewares%2FreqValidators%2Fvideos.js;h=8c4e23b6b427e4f198dc7076215d0f9e8cd5db0c;hb=207fbab44d04ec92d748b6a32ec9a237029f820b;hp=3763a657ceb9f9f1e2e71d16af829311382707f9;hpb=155098af555ef94fb543beb8b82d21523362a7c7;p=github%2FChocobozzz%2FPeerTube.git diff --git a/middlewares/reqValidators/videos.js b/middlewares/reqValidators/videos.js index 3763a657c..8c4e23b6b 100644 --- a/middlewares/reqValidators/videos.js +++ b/middlewares/reqValidators/videos.js @@ -24,8 +24,8 @@ } videos.videosAdd = function (req, res, next) { - req.checkFiles('input_video.originalname', 'Should have an input video').notEmpty() - req.checkFiles('input_video.mimetype', 'Should have a correct mime type').matches(/video\/(webm)|(mp4)|(ogg)/i) + req.checkFiles('input_video[0].originalname', 'Should have an input video').notEmpty() + req.checkFiles('input_video[0].mimetype', 'Should have a correct mime type').matches(/video\/(webm)|(mp4)|(ogg)/i) req.checkBody('name', 'Should have a name').isLength(1, 50) req.checkBody('description', 'Should have a description').isLength(1, 250)