title: Laravel 5.4 fopen(): Filename cannot be empty
body: <p>I want to upload image in laravel 5.4
  Here's the code:</p>
  
  <pre><code>if ($request-&gt;hasFile('image') &amp;&amp; $request-&gt;image-&gt;isValid()) {
          $image = $request-&gt;image;
  
          $image_name = bcrypt($image-&gt;getClientOriginalName());
  
          Storage::disk('public')-&gt;putFileAs('images', $image, $image_name . '.' . $image-&gt;getClientOriginalExtension());
  
          $article-&gt;image($image_name);
      }
  </code></pre>
  
  <blockquote>
    <p>in FilesystemAdapter.php (line 146)</p>
  </blockquote>
  
  <p>I checked the FileSystemAdapter.php and saw that the problem is in this line:</p>
  
  <pre><code>$stream = fopen($file-&gt;getRealPath(), 'r+');
  </code></pre>
  
  <p>When I var dump the $file variable it returns the correct info, but when I <code>var_dump($file-&gt;getRealPath();</code> it says <code>bool(false)</code> and I can't upload the image</p>