title: In which directory should I save uploaded files for MERN Stack?
body: <p>I'm using the Mern stack, but I'm having an issue as to where to save uploaded files. Let me explain.</p>
  
  <p>I have a form that sends over a formdata which includes a <code>.jpg</code> image.
  On Node/express side, I receive it well. But now I'm stuck.</p>
  
  <p>I'm using <code>express-fileupload</code> package which attaches an <code>mv</code> function that allows me to store my file in a directory.</p>
  
  <p>In my endpoint, I have this snippet:</p>
  
  <pre class="lang-js prettyprint-override"><code>const img1= req.files.image1;
  const img1Name = img1.name;
  img1.mv("NOT-SURE-WHERE-TO-MAKE-MY-DIRECTORY"+img1Name, (err) =&gt; {
      if (err) {
          return res.status(500).json({message: 'Could Not mv file'});
      } else {
          return res.status(200).json({message: 'mv done'});
      }
  })
  </code></pre>
  
  <p>Where do I create the directory to store the .jpg image?</p>
  
  <ul>
  <li><p>Do I create it in the client's src? or client's public?</p></li>
  <li><p>Or, do I run the <code>npm-run-build</code> command to create my <code>build</code> folder and then point my <code>mv</code> function to save the file in there?</p></li>
  </ul>