diff --git a/index.js b/index.js index 6505778..1385c62 100644 --- a/index.js +++ b/index.js @@ -125,7 +125,7 @@ app.post('/upload', function (req, res) { // The name of the input field (i.e. "sampleFile") is used to retrieve the uploaded file const uploadPath = path.join(__dirname, '/public/videos/'); - req.files.file.mv("/home/steady/video-player/public/videos/video.mp4", function (err) { + req.files.file.mv(uploadPath + req.files.file.name, function (err) { if (err) { return res.status(500); } diff --git a/public/index.html b/public/index.html index 867eb34..5c419e0 100644 --- a/public/index.html +++ b/public/index.html @@ -19,6 +19,7 @@ +

The file should always be named video.mp4