Node Express Busboy文件和字段上传

当用Express来处理图片上传时,我可以得到一个multipart / form-data的字段和文件,如下所示:

var busboy = require('connect-busboy'); app.use(busboy()); app.post('/something', function(req,res) { req.pipe(req.busboy); req.busboy.on('field', function(fieldname, val) { // do stuff here with fields... } req.busboy.on('file', function (fieldname, file, filename) { // do stuff here with the file } }); 

我想知道的是,有一个例子,在我处理文件之前,我想知道这些字段是什么。 在我的实验中,似乎每次都得到第一个字段。 有谁知道这是否总是如此?