title: node-formidable and a simple progress bar
body: <p>If I look into the node-formidable documentation I can read:</p>
  
  <pre><code>"Event: 'progress' (bytesReceived, bytesExpected)
  Emitted after each incoming chunk of data that has been parsed. 
  Can be used to roll your    own progress bar."
  </code></pre>
  
  <p>I am wondering how to implement my own progress bar I mean how to read that information client side? I am quite confused. Is it implemented with a polling GET that starts after the POST has started or is it possible to read the information from the POST request while uploading?</p>
  
  <p>If I look at this: </p>
  
  <pre><code>http.createServer(function(req, res) {
    if (req.url == '/upload' &amp;&amp; req.method.toLowerCase() == 'post') {
      // parse a file upload
      var form = new formidable.IncomingForm();
      form.parse(req, function(err, fields, files) {
        res.writeHead(200, {'content-type': 'text/plain'});
        res.write('received upload:\n\n');
        res.end(sys.inspect({fields: fields, files: files}));
      });
      return;
    }
  </code></pre>
  
  <p>Look like the /upload url is handling the POST request and returning something res.write('received upload:\n\n');</p>
  
  <p>My question is who can read that</p>
  
  <pre><code>res.write('received upload:\n\n');
  </code></pre>