title: File upload using .fetch() in ReactJS
body: <p>I am trying to upload file using <code>.fetch()</code> in ReactJS as Front End and Laravel as Back End. My ReactJS code is like below</p>
  
  <pre><code>update= (event) =&gt; {
  let uploadImage =  event.target.file;
  let form = new FormData()
  form.append('uploadImage',uploadImage)
  
  fetch('http://127.0.0.1:8000/api/addresses/upload', {
    headers: {
      'Authorization': 'Bearer ' + Auth.getToken(),
      'Content-Type': 'multipart/form-data',
    },
    method: "POST",
    body: form,
  })
  .then(response =&gt; response.json())
  .catch(error =&gt; console.error('Error:', error))
  .then(response =&gt; console.log('Success:', response));
  }
  </code></pre>
  
  <p>My Laravel code is like below</p>
  
  <pre><code>public function fileUpload(StoreImageRequest $request)
      {
          $image           = $request-&gt;uploadImage;
          $imagename       = time() . $image-&gt;getClientOriginalName();
          $destinationPath = public_path('/images');
          $uploadValue     = $image-&gt;move($destinationPath, $imagename);
          if ($uploadValue) {
              return response()-&gt;json($imagename);
          }
      }
  </code></pre>
  
  <p>I am getting error like below</p>
  
  <p><a href="https://i.stack.imgur.com/7Dlv1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7Dlv1.png" alt="enter image description here"></a></p>
  
  <p>and</p>
  
  <p><a href="https://i.stack.imgur.com/aTnxs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/aTnxs.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/NXSAs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NXSAs.png" alt="enter image description here"></a></p>
  
  <p>Where is the issue ?</p>