title: Error caused by internal server sending from ajax
body: <p>I get an internal server error when I try to move an image to public:</p>
  
  <pre><code>$image = $request-&gt;get('image');
  $image = explode(";", $image)[1];
  $image = explode(",", $image)[1];
  $image = str_replace(" ", "+", $image);
  $image = base64_decode($image);
  
  //This line of code is causing internal server error when try to move the image to the public folder .
  file_put_contents("public/milename.jpeg", $image);
  </code></pre>
  
  <p>How can I remove this error by successfully move the image to the public folder. I am stuck here, any tip of advice. Please!</p>