This commit is contained in:
The Ghost of FOSS' Past 2024-10-28 12:17:51 -05:00
parent bd7b0d65f3
commit 86d2de403f

View file

@ -92,7 +92,7 @@ app.get('/download', (req, res) => {
} }
// Send the file // Send the file
res.sendFile(downloadedFilePath, (err) => { res.download(downloadedFilePath, (err) => {
if (err) { if (err) {
console.error('Error sending the file:', err); console.error('Error sending the file:', err);
return res.status(500).json({ error: 'Failed to send the file.', details: err.message }); return res.status(500).json({ error: 'Failed to send the file.', details: err.message });