title: File upload using Multipart fails in nodejs
body: <p>I'm trying to upload a file in node js using multipart where I get Cannot POST error? I'm totally new to node js. So can you help me what I'm doing wrong 
  My Code?
  HTML</p>
  
  <pre><code>&lt;form id   = "uploadForm"
       enctype   = "multipart/form-data"
       action    = "/api/uploadfile"
       method    = "post"&gt;
  &lt;input type="file" name="fileUpload"/&gt;
  &lt;input type="submit" value="Upload File" name="submit"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Server.js</p>
  
  <pre><code>var express  = require('express');
  var app      = express();
  var multer  =   require('multer');
  app.use(express.static(__dirname));
  app.get('/', function(request, response){
      response.sendFile("./index.html"); 
  });
  
  var storage =   multer.diskStorage({
    destination: function (req, file, callback) {
      callback(null, './uploads');
    },
    filename: function (req, file, callback) {
      callback(null, file.fieldname + '-' + Date.now());
    }
  });
  var upload = multer({ storage : storage}).single('fileUpload');
  
  
  app.post('/api/uploadfile',function(req,res){
      upload(req,res,function(err) {
          if(err) {
              return res.end("Error uploading file.");
          }
          res.end("File is uploaded");
      });
  });
  
  
  app.listen(8080);
  console.log("App listening on port 8080");
  </code></pre>
  
  <p>Error message as follows  :</p>
  
  <blockquote>
    <p><strong>Error uploading file</strong></p>
  </blockquote>