From 893e147cc3837e60b0f39c138ed1530de45d3409 Mon Sep 17 00:00:00 2001 From: Filip Borum Poulsen Date: Thu, 21 Mar 2024 13:54:22 +0100 Subject: [PATCH] REVERT and add video file name notice --- index.js | 2 +- public/index.html | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) 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