I am using res.download in express.js on my server to give a file for download. If I support partial range in my server callback function of res.download will be called several times. How can I know when download is completely finished?
res.download(filePath, fileName, function(){
// Error handling
if(req.headers.range)
{
// downloading with range support
// here will be called several times
}
})