aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/v1/videos.js
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-03-18 16:44:54 +0100
committerChocobozzz <florian.bigard@gmail.com>2016-03-18 16:44:54 +0100
commit8c9c1942f6b5675cfca802e2f707bef3c217afbf (patch)
treecf86a39e5cda278f29cb6297b90f7ac4ff13dbad /server/controllers/api/v1/videos.js
parenta4c157519738d89f8a77143b91e92dfd2e70380a (diff)
downloadPeerTube-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/videos.js')
-rw-r--r--server/controllers/api/v1/videos.js4
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
38const reqFiles = multer({ storage: storage }).fields([{ name: 'input_video', maxCount: 1 }]) 38const reqFiles = multer({ storage: storage }).fields([{ name: 'videofile', maxCount: 1 }])
39 39
40router.get('/', cacheMiddleware.cache(false), listVideos) 40router.get('/', cacheMiddleware.cache(false), listVideos)
41router.post('/', reqFiles, reqValidator.videosAdd, cacheMiddleware.cache(false), addVideo) 41router.post('/', reqFiles, reqValidator.videosAdd, cacheMiddleware.cache(false), addVideo)
@@ -50,7 +50,7 @@ module.exports = router
50// --------------------------------------------------------------------------- 50// ---------------------------------------------------------------------------
51 51
52function addVideo (req, res, next) { 52function 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) {