title: in destination folder uploaded file is not store in nodejs
body: <p>controller.js</p>
  
  <pre><code>var multer = require('multer');
  
  var upload = (req, res) =&gt; {
      var doc = req.files.file;
      var storage = multer.diskStorage({
          destination:(req,files, cb)=&gt; {
            cb(null, '/uploads')
          },
          filename:(req,files, cb) =&gt; {
              var datetimestamp = Date.now();
              cb(null, uploadDoc.originalname);
  
          }
        })
  
        var upload = multer({
          storage: multer.memoryStorage()
      }).single('file')
  
  
      upload(req, res, function (err) {
          if(err) {
              res.json({ error_code: 1, err_desc: err });
              return;
          }
          res.json({'msg': 'File uploaded successfully!', 'file': req.files.file});
  
  
      });
  };
  
  module.exports={ upload:upload}
  </code></pre>
  
  <p>router.js</p>
  
  <pre><code>var express =require("express");
  var Router = express.Router();
  
  var Controller = require('../Controllers/Ucontrollers');
  
  Router.route('/upload/file').post(Controller.mediaUpload);
  
  module.exports =Router;
  </code></pre>
  
  <p>in Postman showing results:</p>
  
  <pre><code>{
      "msg": "File uploaded successfully!",
      "file": {
          "fieldName": "file",
          "originalFilename": "doc.pdf",
          "path": "C:\\Users\\DELL\\AppData\\Local\\Temp\\zwruODmEBT-iWFT0_zDJt8-y.pdf",
          "headers": {
              "content-disposition": "form-data; name=\"file\"; filename=\"doc.pdf\"",
              "content-type": "application/pdf"
          },
          "size": 292202,
          "name": "doc.pdf",
          "type": "application/pdf"
      }
  }
  </code></pre>
  
  <p>however in destination folder nothing inside the document.In postman getting result sucessfully but in upload folder not stored.</p>
  
  <p>I tried everthing but document is not stored in the destination.Where i did mistake here.</p>