title: Fixing error: Cannot read property 'path' of undefined
body: <p>I'm using MERN and multer to post and get images and data. I have no issues accomplishing this within Postman, but when I run the code it compiles the following error:</p>
  
  <pre><code>TypeError: Cannot read property 'path' of undefined
      at router.post (...routes\property.js:42:34)
  </code></pre>
  
  <p><strong>Code:</strong></p>
  
  <pre><code>router.post('/add', upload.single('propertyImage'), (req, res, next) =&gt; {
    console.log(req.file)
    const propertyImage = req.file.path;
  </code></pre>
  
  <p>I'm assuming that my <code>req</code> call is wrong? I've attempted to change the <code>req</code> to <code>req.file</code> and <code>req.body.propertyImage</code> but that results in a different error entirely or the same error. </p>
  
  <p>What am I missing here?</p>