0

我正在使用瀑布模型一个接一个地调用函数列表。在上传 req.on 'data' 期间永远不会被调用。下面是代码。怎么了。

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)->
4

1 回答 1

0

如果您无法升级到最新的 nodejs,请使用 mjijackson 的 bufferedstream

于 2013-11-12T00:15:29.350 回答