title: How can i use multer with react?
body: <p>I am build a web app with Node.js and React and I am trying to store some files at my backend.
  For some reason i cant access to my req.path , although I configured all multer strategies.</p>
  <pre><code>const multer = require('multer')
  const config = require('config')
  const auth = require('../../middleware/auth')
  const {check , validationResult } = require('express-validator');
  
  const storage = multer.diskStorage({
      destination: function(req, file , cb){
          cb(null,'uploads/')
      },
      filename: function(req, file, cb){
          cb(null, req.user.id)
      }
  });
  
  const fileFilter = (req, file , cb) =&gt;{
      if(file.mimetype === 'image/jpeg' || file.mimetype === 'image/jpg' || file.mimetype === 'image/png')
      cb(null,false);
      else
      cb(null,true);
  }
  </code></pre>
  <p>my route:</p>
  <pre><code>router.post('/' , [auth,upload.single('image'),
      [
      check('status','Status is required').not().isEmpty(),
      check('skills','Skills is required').not().isEmpty(),
      check('gender','Gender is required').not().isEmpty()
      ]],
      async (req,res) =&gt; {// cant access to req.file.....}
  </code></pre>
  <p>and my react form:</p>
  <pre><code> &lt;div className=&quot;form-group&quot;&gt;
                     &lt;input type=&quot;text&quot; placeholder=&quot;Choose profile image&quot; name=&quot;profileImage&quot; value={image}/&gt;
                     &lt;input type=&quot;file&quot; placeholder=&quot;Upload&quot;  enctype=&quot;multipart/form-data&quot; name=&quot;image&quot; onChange={(e) =&gt; onChange(e)}/&gt;
                     &lt;small className=&quot;form-text&quot;&gt;The image must not be bigger then 5MB and only JPG\JPEG\PNG types&lt;/small&gt;
   &lt;/div&gt;
  </code></pre>
  <p>Please , what am i doing wrong?</p>