【发布时间】:2019-09-24 19:50:22
【问题描述】:
我在我的服务器上使用 express.js 中的 res.download 来提供文件以供下载。如果我在 res.download 的服务器回调函数中支持部分范围,则会多次调用。我怎样才能知道下载何时完全完成?
res.download(filePath, fileName, function(){
// Error handling
if(req.headers.range)
{
// downloading with range support
// here will be called several times
}
})
【问题讨论】:
标签: node.js express http-range