title: Laravel 5 getting the hash of an uploaded image
body: <p>I upload an image and I am trying to get the hash of the image in a variable without saving the images.</p>
  
  <pre><code>foreach($request-&gt;only('photos') as $files){
      foreach ($files as $file) {
          if(is_file($file)) {
              $fname = $file-&gt;getClientOriginalName();
  
              $hash = file_get_contents($fname));
  
              dd($hash);
          }
      }
  }
  </code></pre>
  
  <p>I keep getting this error:</p>
  
  <blockquote>
    <p>"file_get_contents(1.jpg): failed to open stream: No such file or
    directory"</p>
  </blockquote>
  
  <p>Anyone knows how I can fix this?</p>