title: Laravel upload any size of file in Google Drive
body: <p>I am currently developing a Laravel 5.4 app running on PHP 7. I am using Google Drive as my storage.I am trying to upload large file,size of 200-300 mb or small file of 10-12 kb to my google drive storage using <code>nao-pon/flysystem</code>.For this,I have followed this tutorial: <a href="https://gist.github.com/ivanvermeyen/cc7c59c185daad9d4e7cb8c661d7b89b" rel="nofollow noreferrer">https://gist.github.com/ivanvermeyen/cc7c59c185daad9d4e7cb8c661d7b89b</a>.
  I have changed my php.ini like this:</p>
  
  <pre><code>post_max_size = 800M
  
  upload_max_filesize = 700M
  </code></pre>
  
  <p>I can upload small file.The problem occurred when I am trying to upload large file,size of 200-250 mb,the alotted php <code>memory_limit</code> surpasses and I get error.</p>
  
  <p><strong>I have used this controller method</strong></p>
  
  <pre><code>$files = $request-&gt;file('files');
  if($request-&gt;hasFile('files')){
  
  foreach ($files as $file) {
  
  $name = $file-&gt;getClientOriginalName();
  $disk = Storage::disk('google'); 
  $disk-&gt;put($name, File::get($file));
  
       }
        }
  </code></pre>
  
  <p>So,I have searched google, how can I upload large file without surpassing the </p>
  
  <pre><code>memory_limit 
  </code></pre>
  
  <p>and I get this for Amazon S3 and I modified it for Google drive:</p>
  
  <pre><code>$disk = Storage::disk('google');
  $disk-&gt;put($name, fopen($file, 'r+'));
  </code></pre>
  
  <p>But,now I am getting another error trying to upload any size of file (10kb-300mb):</p>
  
  <pre><code>(1/1) ErrorException
  A non well formed numeric value encountered
  
  in GoogleDriveAdapter.php (line 1143)
  at HandleExceptions-&gt;handleError(8, 'A non well formed numeric value encountered', '/app/vendor/nao-pon/flysystem-google-drive/src/GoogleDriveAdapter.php', 1143, array('iniName' =&gt; 'memory_limit', 'val' =&gt; '128M', 'last' =&gt; 'm'))in GoogleDriveAdapter.php (line 1143)]
  </code></pre>
  
  <p>This method is working fine for Local storage.But not for google drive.
  So, my question is,is there any way or package out there which is simple and I can implement it easily to upload any size of file to my google drive without any hassel.</p>