title: Laravel stores temporary files instead
body: <p>I have code below and instead of saving files it saves temporary files in location</p>
  <h1>Code</h1>
  <pre><code>public function upload(Request $request)
  {
      //validate the file
      if (!$request-&gt;hasFile('file_to_import')) {
          return new JsonResponse([
              'status'  =&gt; 'fail',
              'message' =&gt; trans('json.needSelectFile'),
          ]);
      }
  
      $file = $request-&gt;file('file_to_import');
  
      if (strtolower($file-&gt;getClientOriginalExtension()) != 'csv') {
          return new JsonResponse([
              'status'  =&gt; 'fail',
              'message' =&gt; trans('json.needValidCSV'),
          ]);
      }
  
      $disk = Storage::disk('local');
  
      if (!$disk-&gt;exists('feeds/translations')) {
          $disk-&gt;makeDirectory('feeds/translations');
      }
  
      $uploaded_date = now();
      $name_without_extension = str_replace('.' . $file-&gt;getClientOriginalExtension(), '', $file-&gt;getClientOriginalName());
  
      $new_filename = $name_without_extension . ' - ' . $uploaded_date . '.' . $file-&gt;getClientOriginalExtension();
      $location = storage_path('app/feeds/translations/', $new_filename);
      $file-&gt;move($location);
  
      return new JsonResponse([
          'status'   =&gt; 'success',
          'filename' =&gt; $new_filename,
      ]);
  }
  </code></pre>
  <p><code>file i uploaded</code></p>
  <p><a href="https://i.stack.imgur.com/2227k.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2227k.png" alt="two" /></a></p>
  <p><code>what saved in my app location</code></p>
  <p><a href="https://i.stack.imgur.com/aZ3e9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/aZ3e9.png" alt="one" /></a></p>
  <h1>What I need</h1>
  <p>Is to save real file <code>translator_translations - 2019-04-15 05:52:50.csv</code> and not tmp file.</p>
  <p><strong>any idea?</strong></p>