Correction des chemins d'accès aux répertoires dans la route GET /projects/:id/create-video

This commit is contained in:
2025-01-15 09:10:45 +01:00
parent 94cb882b9e
commit fed1f27977

View File

@@ -50,10 +50,10 @@ router.get('/projects', async (req, res) => {
*/ */
router.get('/projects/:id/create-video', async (req, res) => { router.get('/projects/:id/create-video', async (req, res) => {
const projectId = req.params.id; const projectId = req.params.id;
const imageDir = path.join(__dirname, `../storage/${projectId}`); const imageDir = path.join(__dirname, `/storage/${projectId}`);
const outputVideo = path.join(__dirname, `../storage/${projectId}/output_video.mp4`); const outputVideo = path.join(__dirname, `/storage/${projectId}/output_video.mp4`);
const frameRate = 24; const frameRate = 24;
const tempFile = path.join(__dirname, `../storage/${projectId}/temp_file.txt`); const tempFile = path.join(__dirname, `/storage/${projectId}/temp_file.txt`);
try { try {
const images = fs.readdirSync(imageDir).filter(file => file.endsWith('.jpg')); const images = fs.readdirSync(imageDir).filter(file => file.endsWith('.jpg'));