title: Laravel does not get the temppath when upload bigger files
body: <p>I need to handle a file in a Laravel controller,</p>
  <p><em>TL;DR</em></p>
  <p>How to handle big files through laravel requests?</p>
  <hr />
  <p>When I make the request with the small file, its tempPath is normal: <code>/tmp/php3Hijl5</code>
  But when I make a request for a large file it comes: <code>/home/p.../public</code></p>
  <p>This can happen because php defines a maximum size in <code>php.ini</code> called <code>upload_max_filesize</code>.</p>
  <p>Trying to solve this problem, I'm setting the project to a larger <code>upload_max_filesize</code>:</p>
  <p><code>ini_set('upload_max_filesize', '50M');</code></p>
  <p>But this thing is not reflecting in the project, because when I give <code>ini_get('upload_max_filesize');</code>
  it returns a <code>'2M'</code>.</p>
  <p>When I try to handle the file with <code>fgetcsv()</code> it says that this tempPath is a directory.</p>
  <p><a href="https://i.stack.imgur.com/8Tc1s.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8Tc1s.png" alt="Laravel Error: fgetcsv(): read of 8192 bytes failed with errno=21 Is a directory " /></a></p>
  <p>Im using dd() to check the file tempPath.</p>
  <p>Controller.php</p>
  <pre><code>    public function assignToClients(Request $request, $id)
      {
          $file = $request-&gt;file('csv_joining_clients');
  
          if (!$file) {
              return response([
                  'message' =&gt; 'You have to upload a CSV file'
              ], 400);
          }
  
          $array = $this-&gt;parseCsvToString($file);
  
          dd($array);
      }
  
      private function parseCsvToString($file)
      {
          $i = 0;
          $importData_arr = [];
  
          $tempPath = $file-&gt;getRealPath();
  
          dd($tempPath);
  
          $file = fopen($tempPath, 'r');
  
          while (($filedata = fgetcsv($file, 10000, &quot;,&quot;)) !== false) {
              $num = count($filedata);
  
              for ($c = 0; $c &lt; $num; $c++) {
                  $importData_arr[$i][] = $filedata[$c];
              }
              $i++;
          }
          fclose($file);
  
          return $importData_arr;
      }
  
  </code></pre>