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:18:18 +01:00
parent fed1f27977
commit d71de3e33c

View File

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