title: Node JS) Image upload issue with undefined
body: <pre><code>var http = require('http');
  var express = require('express');
  var request = require('request');
  var mysql = require('mysql');
  var bodyParser = require('body-parser');
  var fs = require('fs');
  
  var multer = require('multer');
  
  var app = express();
  app.use(bodyParser.json());
  app.use(express.bodyParser());
  app.use(app.router);
  
  app.use(multer( {dest:'./uploads/',
      onFileUploadStart : function(file){
          console.log('File recieved:');
          console.log(file);
      },
       onFileUploadData:function (file,data){
          console.log('Data recieved');
      },
       onParseEnd: function(req,next){
          next();
       }
  }));
  
  
  app.use(express.static(__dirname+"/public"));
  
  app.post('/upload',function(request,response){
      console.log(request.file);
      console.log(request.body);
  });
  </code></pre>
  
  <p>It's my core codes for handling uploading image above.</p>
  
  <pre><code>    app.post('/upload',function(request,response){
      console.log(request.file);
      console.log(request.body);
  });
  </code></pre>
  
  <p>But what I got is 
  'undefined
  {}'</p>
  
  <p>What's wrong with me?
  I'm searching for many questions and most of them said I have to use multer... But the result is the same nothing changes.</p>
  
  <p>My package.json is below:</p>
  
  <blockquote>
    <p>{
      "name": "photozzle",
      "version": "1.0.0",
      "dependencies": {
        "body-parser": "1.14.1",
        "clear": "<em>",
        "express": "3.5.1",
        "fs": "</em>",
        "multer": "^0.1.6",
        "mysql": "<em>",
        "path": "</em>",
        "q": "<em>",
        "request": "</em>"
      },
      "engines": {
        "node": "0.10.x",
        "npm": ">1.4.0"
      }
    }</p>
  </blockquote>
  
  <p>Do you think? Is there anything I'm missing?</p>
  
  <p>I'm using post man to test it.
  <a href="https://i.stack.imgur.com/wsScp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wsScp.png" alt="enter image description here"></a></p>
  
  <p>Finally, I solved this one thanks to 'Lazarev Alexandr'
  The picture below could be proof. 
  I wish my question will be helpful for my newbie developers like me. Gracias!
  <a href="https://i.stack.imgur.com/HFpP8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HFpP8.png" alt="enter image description here"></a></p>