title: Laravel Input::hasFile returning false while Input::file() gives all the information about file
body: <p>I have written following basic file upload code which <strong>works perfectly on localhost</strong>. On live version, <code>Input::hasFile('profile_picture')</code> returns false consequently <strong>file is not moved to the required directory</strong>, while <code>$filename = Input::file('profile_picture')-&gt;getClientOriginalName();</code> works fine and receives the file name.</p>
  
  <p>On removing the if hasFile check before moving the file, <strong>the move function throws exception</strong> saying,
  <code>Symfony \ Component \ HttpFoundation \ File \ Exception \ FileException</code>
  <code>File could not be uploaded: missing temporary directory.</code></p>
  
  <p>What I have confirmed:</p>
  
  <ul>
  <li>Large file size is not the problem, I have tried to upload 1.4kb file as well as I have <code>ini_set('memory_limit', '128M');</code> in my <code>index.php</code>.</li>
  <li>Html form has no common problem like missing <code>'files' =&gt; true</code>, and csrf token.</li>
  </ul>
  
  <p>upload.blade.php contains:</p>
  
  <pre><code>{{ Form::open(['url' =&gt; 'api/users', 'files' =&gt; true]) }}
  File: {{ Form::file('profile_picture') }}
  {{ Form::hidden('email', 'asimawan.62@gmail.com') }}
  {{ Form::submit('send') }}
  {{ Form::close() }}
  </code></pre>
  
  <p>Generated form looks like:</p>
  
  <pre><code>&lt;form method="POST" action="http://localhost:8000/api/users" accept-charset="UTF-8" enctype="multipart/form-data"&gt;&lt;input name="_token" type="hidden" value="96OKRdiwnHlku0uMLYYpHPjAIKAiqoKRp372fUWc"&gt;
  File: &lt;input name="profile_picture" type="file"&gt;
  &lt;input name="email" type="hidden" value="asimawan.62@gmail.com"&gt;
  &lt;input type="submit" value="send"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>routes.php contains:</p>
  
  <pre><code>Route::get('upload', function() {
      return View::make('upload');
  });
  
  Route::resource('api/users', 'UsersController');
  </code></pre>
  
  <p>UsersController::store()</p>
  
  <pre><code>    public function store()
      {
          if ($this-&gt;user-&gt;isValid($data = Input::all())) {
  
              $data = Input::all();
              $filename = Input::file('profile_picture')-&gt;getClientOriginalName();
              $data['profile_picture'] = $filename;
  
              if (Input::hasFile('profile_picture')) {
                  Input::file('profile_picture')-&gt;move(public_path('pictures/profile'), $filename);
              } else {
                  return "Input::hasFile('profile_picture') has returned false. Size = "
                      . Input::file('profile_picture')-&gt;getClientSize();
              }
  
              $this-&gt;user-&gt;fill($data);
              $this-&gt;user-&gt;save();
              return Response::json($this-&gt;user);
          }
  
          return Response::json($this-&gt;user-&gt;errors);
      }
  </code></pre>