diff options
Diffstat (limited to 'server/controllers')
-rw-r--r-- | server/controllers/api/videos.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/controllers/api/videos.js b/server/controllers/api/videos.js index 2c9e4940e..daf452573 100644 --- a/server/controllers/api/videos.js +++ b/server/controllers/api/videos.js | |||
@@ -110,7 +110,7 @@ function addVideo (req, res, next) { | |||
110 | function renameVideoFile (video, callback) { | 110 | function renameVideoFile (video, callback) { |
111 | const videoDir = constants.CONFIG.STORAGE.VIDEOS_DIR | 111 | const videoDir = constants.CONFIG.STORAGE.VIDEOS_DIR |
112 | const source = path.join(videoDir, videoFile.filename) | 112 | const source = path.join(videoDir, videoFile.filename) |
113 | const destination = path.join(videoDir, video.getFilename()) | 113 | const destination = path.join(videoDir, video.getVideoFilename()) |
114 | 114 | ||
115 | fs.rename(source, destination, function (err) { | 115 | fs.rename(source, destination, function (err) { |
116 | return callback(err, video) | 116 | return callback(err, video) |
@@ -118,7 +118,7 @@ function addVideo (req, res, next) { | |||
118 | }, | 118 | }, |
119 | 119 | ||
120 | function insertIntoDB (video, callback) { | 120 | function insertIntoDB (video, callback) { |
121 | video.save(function (err, video, videoFile) { | 121 | video.save(function (err, video) { |
122 | // Assert there are only one argument sent to the next function (video) | 122 | // Assert there are only one argument sent to the next function (video) |
123 | return callback(err, video) | 123 | return callback(err, video) |
124 | }) | 124 | }) |