I am trying to download multiple files from Node js server. i can download single file using following code
res.download('group_documents/sample1.pdf','sample1.pdf', function(err){
if (err) {
console.log(err);
} else {
// decrement a download credit etc
}
});
How can i download files using single request from the client.
if your target clients are web browsers, then you can't, as the http protocol does not allow for multiple downloads for a single request.
If you really need to do this, then you'd need to either write a custom client application, or (more simply) zip the files into some archive before transmitting them.