title: How to do upload with express in node.js
body: <p>My code is like this:</p>
  
  <pre><code>app.configure(function () {
      app.use(express.static(__dirname + "/media"));
      app.use(express.bodyParser({
            keepExtensions: true
      }));
  })
  
  app.post('/upload', function (req, res) {
      console.log(req.files);
  
      res.send("well done");
      return;
  })
  </code></pre>
  
  <p>ant do some job like: </p>
  
  <p>1.Do someting on the <code>progoress</code> event, how can I bind handler to the <code>progress</code>, <code>complete</code> event, I have tried <code>req.files.on('progress', fn)</code>, but it doesn't work</p>
  
  <p>2
  I know how to use <code>req.files</code> to get the file's imformation,
  but how can I limit the upload file's size before it upload, or limit the upload image resolution？</p>