I can’t upload it with multer.

  node.js, question

index.jade

block content
 h1= title
 p Welcome to #{title}
 form(method="POST",action='/avatar',entype='multipart/form-data').form-horizontal
 .form-group
 Col-md-2.control-label (for =' upload') upload
 .col-md-10
 input.form-control(type='file',id='upload',name='avatar')
 Button.btn.btn-primary.control-label (type = "submit") upload

app.js

var express = require('express');
 var path = require('path');
 var favicon = require('serve-favicon');
 var logger = require('morgan');
 var cookieParser = require('cookie-parser');
 var bodyParser = require('body-parser');
 var port = process.env.PORT || 3000;
 var multer = require('multer');
 var upload = multer({dest:'./uploads/'});
 var fs = require('fs');
 
 
 
 var app = express();
 
 // view engine setup
 app.set('views', path.join(__dirname, 'views'));
 app.set('view engine', 'jade');
 
 // uncomment after placing your favicon in /public
 //app.use(favicon(path.join(__dirname, 'public', 'favicon.ico')));
 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.listen(port);
 
 
 app.get('/',function  (req,res,next) {
 Res.render ('index',' title:' upload'});
 });
 app.post('/avatar',upload.single('avatar'),function(req, res) {
 console.log(upload.single('avatar'));
 console.log(req.file);
 res.status(200).json({ file: req.file});
 });

Then the running req.file is undefined.
And there are no uploaded files under the uploads folder

Lost ‘c ‘enctype, sorry