i have a post method "/exports" that gets information out of a database and creates a xml file. at the end of the funktion, i want the user to download this xml file. therefore I used this:
res.download('./downloads/'+ name+".xml", (err)=>{
if(err) console.log(err)
})
res.redirect('/');
But I only got this error then:
Error: Request aborted
at onaborted (/home/ec2-user/environment/node_modules/express/lib/response.js:1030:15)
at Immediate._onImmediate (/home/ec2-user/environment/node_modules/express/lib/response.js:1072:9)
at processImmediate (node:internal/timers:466:21) {
code: 'ECONNABORTED'
}
The name of the file and the direction is correct, so I don't know what this error means.