我想知道如何将响应节点流对象传递给form.on()以便已经上传的文件的名称将显示在屏幕上。
var formidable = require("formidable");
function upload(response, request) {
var form = new formidable.IncomingForm();
form.on('fileBegin', function(name, file, flower) {
file.path = './uploads/' + file.name;
var flowerImage = file.name ;
response.writeHead(200, {"Content-Type": "text/html"});
response.write("image name is " + flowerImage);
response.end();
});
}