title: Issue uploading an excel file from React to Nodejs
body: <p>I have written the following code in React</p>
  
  <pre><code>let onChange1 = (e) =&gt;{
      let files=e.target.files[0]
      console.warn(' data file', files)
  
      let formdata = new FormData()
      formdata.append('excel file', files)
  
      axios({
          url: 'http://localhost:3000/excel',
          method: "POST",
          headers:{
              authorization: "Bearer " + token    
          },
          data: formdata
      })
      .then(()=&gt;{
          console.log('success')
      })
  }
   //inside return
   &lt;input type='file' name='file' onChange={onChange1}/&gt;
  </code></pre>
  
  <p>And the following in Nodejs</p>
  
  <pre><code> stockDataRouter.route('/excel')
  .options(cors.corsWithOptions, (req,res)=&gt;{ res.sendStatus(200)})
  .post(cors.cors,(req,res)=&gt;{
      console.log(req.body)
      res.sendStatus(200)
  })
  </code></pre>
  
  <p>I send the req from React to Nodejs and if I look into chrome dev tools I can clearly see that there is a formdata <strong>'excel file'</strong> in the request. But then the <strong>Req.body</strong> is empty when I try to log it in NodeJs. Could you tell me if there is an issue with my code and how to solve it?</p>