title: PayloadTooLargeError: request entity too large error in nodejs
body: <p>I am trying to pass the file to microservice from api_gateway, I can get the file in api_gateway from reactjs but in my microservice I am getting <strong>PayloadTooLargeError: request entity too large error in nodejs</strong></p>
  <p><strong>API gateway</strong></p>
  <pre><code> const form = formidable({ multiples: true });
        form.parse(req, (err, fields, files) =&gt; {
          if (files.file) {
            const url = api.host + req.originalUrl;
            let formData = new FormData();
            console.log(files)
  
            formData.append('file', fs.createReadStream(files.file.filepath));
            axios.post(url, formData, {})
            .then((response) =&gt; {
              return res.status(response.status).send(response.data);
            })
            .catch((err) =&gt; {
              if (!err.response)
                return res.status(500).send(&quot;Something went wrong!&quot;);
              return res.status(err.response.status).send(err);
            });
          
  </code></pre>
  <p><strong>Multer code in microservice</strong></p>
  <pre><code>const DIR = 'public/uploads';
  
  const storage = multer.diskStorage({
      destination: (req, file, cb) =&gt; {
      cb(null, DIR);
      },
      filename: (req, file, cb) =&gt; {
          const fileName = file.originalname.toLowerCase().split(' ').join('-');
          cb(null, fileName)
      }
  });
  var upload = multer({
      storage: storage,
      fileFilter: (req, file, cb) =&gt; {
          if (file.mimetype == &quot;video/mp4&quot;) {
              cb(null, true);
          } else {
              cb(null, false);
              return cb(new Error('Only .mp4 format allowed!'));
          }
      }
  });
  </code></pre>
  <p><strong>router.js</strong></p>
  <pre><code>router.post(&quot;/profile&quot;, (req, res) =&gt; {
     console.log(req.file);
     const form = formidable({ multiples: true });
     form.parse(req, (err, fields, files) =&gt; {
       console.log(&quot;Fields&quot;, fields);
       console.log(&quot;Files&quot;, files);
       console.log(err);
    });
  });
  </code></pre>
  <p><strong>API gateway index.js</strong></p>
  <pre><code>app.use(bodyParser.json({limit: '500mb', extended: true}));
  </code></pre>
  <p><strong>Microservice index.js</strong></p>
  <pre><code>app.use(bodyParser.json({limit: '50mb', extended: true}));
  </code></pre>