diff options
Diffstat (limited to 'server/controllers/api')
-rw-r--r-- | server/controllers/api/v1/videos.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/controllers/api/v1/videos.js b/server/controllers/api/v1/videos.js index 4384724c1..97d3e6b5a 100644 --- a/server/controllers/api/v1/videos.js +++ b/server/controllers/api/v1/videos.js | |||
@@ -35,7 +35,7 @@ const storage = multer.diskStorage({ | |||
35 | } | 35 | } |
36 | }) | 36 | }) |
37 | 37 | ||
38 | const reqFiles = multer({ storage: storage }).fields([{ name: 'input_video', maxCount: 1 }]) | 38 | const reqFiles = multer({ storage: storage }).fields([{ name: 'videofile', maxCount: 1 }]) |
39 | 39 | ||
40 | router.get('/', cacheMiddleware.cache(false), listVideos) | 40 | router.get('/', cacheMiddleware.cache(false), listVideos) |
41 | router.post('/', reqFiles, reqValidator.videosAdd, cacheMiddleware.cache(false), addVideo) | 41 | router.post('/', reqFiles, reqValidator.videosAdd, cacheMiddleware.cache(false), addVideo) |
@@ -50,7 +50,7 @@ module.exports = router | |||
50 | // --------------------------------------------------------------------------- | 50 | // --------------------------------------------------------------------------- |
51 | 51 | ||
52 | function addVideo (req, res, next) { | 52 | function addVideo (req, res, next) { |
53 | const video_file = req.files.input_video[0] | 53 | const video_file = req.files.videofile[0] |
54 | const video_infos = req.body | 54 | const video_infos = req.body |
55 | 55 | ||
56 | videos.seed(video_file.path, function (err, torrent) { | 56 | videos.seed(video_file.path, function (err, torrent) { |