diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2016-03-18 16:44:54 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2016-03-18 16:44:54 +0100 |
commit | 8c9c1942f6b5675cfca802e2f707bef3c217afbf (patch) | |
tree | cf86a39e5cda278f29cb6297b90f7ac4ff13dbad /server/controllers/api/v1 | |
parent | a4c157519738d89f8a77143b91e92dfd2e70380a (diff) | |
download | PeerTube-8c9c1942f6b5675cfca802e2f707bef3c217afbf.tar.gz PeerTube-8c9c1942f6b5675cfca802e2f707bef3c217afbf.tar.zst PeerTube-8c9c1942f6b5675cfca802e2f707bef3c217afbf.zip |
Change name of fields for add video api
Diffstat (limited to 'server/controllers/api/v1')
-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) { |