revert
This commit is contained in:
parent
bd7b0d65f3
commit
86d2de403f
1 changed files with 1 additions and 1 deletions
2
index.js
2
index.js
|
@ -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 });
|
||||||
|
|
Loading…
Reference in a new issue