From 7c342c3b69bfd5ff972174a56013b684b0e18d47 Mon Sep 17 00:00:00 2001 From: Kerboul Date: Wed, 12 Feb 2025 11:42:15 +0100 Subject: [PATCH] =?UTF-8?q?Modifier=20la=20route=20de=20r=C3=A9cup=C3=A9ra?= =?UTF-8?q?tion=20de=20vid=C3=A9o=20pour=20utiliser=20res.download=20au=20?= =?UTF-8?q?lieu=20de=20res.sendFile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- routes/videoRoutes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routes/videoRoutes.js b/routes/videoRoutes.js index a0253a7..a4c2730 100644 --- a/routes/videoRoutes.js +++ b/routes/videoRoutes.js @@ -370,7 +370,7 @@ router.get('/cat', (_, res) => { console.error('Video not found:', err); return res.status(404).json({ error: 'Video not found' }); } - res.sendFile(videoPath); + res.download(videoPath); }); });