<html>
<head>
<title><%= title %></title>
<link rel="stylesheet" href="/stylesheets/style.css" />
</head>
<body>
<h1><%= title%></h1>
<p>Upload a photo to your account below.</p>
<form method="post" enctype="multipart/form-data" >
<p><input type="text",name="photo[name]",placeholder="Name" /></p>
<p><input type="file", name="photo[image]" /></p>
<p><input type="submit", value="Upload" /></p>
</form>
</body>
</html>
app.use(logger('dev'));
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: false }));
app.use(cookieParser());
app.use(express.static(path.join(__dirname, 'public')));
app.use(multipart());
用的是connect-multipart
处理的上传,req.body.photo
字段却找不到