The below code works fine and I am able to download file in Zip formant but it downloads the file as download_log.zip. How can I give a meaningful name of the file?
exports.download = function(req,res){
var gzip = zlib.createGzip();
var rstream = fs.createReadStream(filePath);
rstream.pipe(gzip).pipe(res);
}
You need to set the Content-Disposition header to attachment; filename="your string here".