我正在使用瀑布模型一个接一个地调用函数列表。在上传请求期间,永远不会调用“数据”。下面是代码。怎么了。
app.post '/upload', (req,res)->
uploadFile = (cb)->
req.on 'data', (chunk)->
console.log "In the on data"+file ""NEVER GETS CALLED.
console.log chunk
file.write chunk
req.on 'end', ->
file.end()
console.log "Wrote file"
cb(null)
async.waterfall [uploadFile],(err,result)->
如果无法升级到最新的nodejs,请使用mjijackson的bufferedstream
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句