|
|
|
@ -91,7 +91,7 @@ function startVideo(path) {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// fs.mkdirSync('/video', { recursive: true });
|
|
|
|
fs.mkdirSync('/video', { recursive: true });
|
|
|
|
|
|
|
|
|
|
|
|
app.post('/play', (req, res) => {
|
|
|
|
app.post('/play', (req, res) => {
|
|
|
|
if (process) {
|
|
|
|
if (process) {
|
|
|
|
@ -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
|
|
|
|
// The name of the input field (i.e. "sampleFile") is used to retrieve the uploaded file
|
|
|
|
const uploadPath = path.join(__dirname, '/public/videos/');
|
|
|
|
const uploadPath = path.join(__dirname, '/public/videos/');
|
|
|
|
|
|
|
|
|
|
|
|
req.files.file.mv(uploadPath + req.files.file.name, function (err) {
|
|
|
|
req.files.file.mv(uploadPath + "video.mp4", function (err) {
|
|
|
|
if (err) {
|
|
|
|
if (err) {
|
|
|
|
return res.status(500);
|
|
|
|
return res.status(500);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|