title: How to store a file on the local storage system
body: <p>I'm trying to upload a file to a temporary location with Laravel Storage Facade and it says that the file doesn't exist. I'm trying to upload the file into ./storage/app/roofing/projects/{id}/then the file. Not sure on where exactly I'm going wrong here.</p>
  
  <pre><code>foreach ($files as $file) {
      $path = Storage::putFile('contract-assets', new File('../storage/app/roofing/projects/'. $project-&gt;id.'/'. $file));
  }
  </code></pre>
  
  <p>I have to send the file after being stored on my local server to AWS S3 because of the time it takes to try and upload straight to S3 and in my case it times due to the number of files needing to be stored. As of now, all I get back is true in my dd(). What could be the cause of this?</p>
  
  <pre><code>if (!empty($request-&gt;contract_asset)) {
      $files = $request-&gt;file('contract_asset');
      foreach ($files as $file) {
          Storage::putFile(Carbon::now()-&gt;toDateString().'/roofing/projects/'. $project-&gt;id.'/contract-assets', $file);
      }
  }
  
  foreach (Storage::files(Carbon::now()-&gt;toDateString().'/roofing/projects/'.$project-&gt;id.'/contract-assets') as $file) {
      dispatch(new ProcessRoofingProjectContractAssets($file, $project));
  }
  </code></pre>
  
  <p>My Job file.</p>
  
  <pre><code>/**
   * Execute the job.
   *
   * @return void
   */
  public function handle()
  {
      $path = Storage::disk('s3')-&gt;put('contract-assets', $this-&gt;asset, 'public');
      dd($path);
      $this-&gt;project-&gt;addContractAsset($path);    
  }
  </code></pre>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>These are my current changes and I am receiving the following error message. <code>Failed because Unable to JSON encode payload. Error code: 5</code></p>
  
  <pre><code>foreach ($files as $file) {
      $returnedStoredFile = Storage::putFile('/roofing/projects/' . $project-&gt;id . '/contract-assets/'.Carbon::now()-&gt;toDateString(), $file);
      dispatch(new ProcessRoofingProjectContractAssets(Storage::get($returnedStoredFile), $project));
  }
  </code></pre>