]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - middlewares/reqValidators/videos.js
Update node modules
[github/Chocobozzz/PeerTube.git] / middlewares / reqValidators / videos.js
index 3763a657ceb9f9f1e2e71d16af829311382707f9..8c4e23b6b427e4f198dc7076215d0f9e8cd5db0c 100644 (file)
@@ -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)