title: Save an uploaded image via an API call in Laravel 4
body: <p>I'm not sure what's going wrong here. This is being done by cURL so excuse the formatting of the output. I can't save an image I've made via an API call. This code:</p>
  
  <pre><code>//snip
  if(Input::hasFile('photo')) {
      var_dump(Input::file('photo')); die();
  }
  </code></pre>
  
  <p>produces:</p>
  
  <pre><code>&lt;pre class='xdebug-var-dump' dir='ltr'&gt;
    &lt;b&gt;array&lt;/b&gt; &lt;i&gt;(size=1)&lt;/i&gt;
      0 &lt;font color='#888a85'&gt;=&amp;gt;&lt;/font&gt;
        &lt;b&gt;object&lt;/b&gt;(&lt;i&gt;Symfony\Component\HttpFoundation\File\UploadedFile&lt;/i&gt;)[&lt;i&gt;9&lt;/i&gt;]
        &lt;i&gt;private&lt;/i&gt; 'test' &lt;font color='#888a85'&gt;=&amp;gt;&lt;/font&gt; &lt;small&gt;boolean&lt;/small&gt; &lt;font color='#75507b'&gt;false&lt;/font&gt;
        &lt;i&gt;private&lt;/i&gt; 'originalName' &lt;font color='#888a85'&gt;=&amp;gt;&lt;/font&gt; &lt;small&gt;string&lt;/small&gt; &lt;font color='#cc0000'&gt;'moon-rising.jpg'&lt;/font&gt; &lt;i&gt;(length=15)&lt;/i&gt;
        &lt;i&gt;private&lt;/i&gt; 'mimeType' &lt;font color='#888a85'&gt;=&amp;gt;&lt;/font&gt; &lt;small&gt;string&lt;/small&gt; &lt;font color='#cc0000'&gt;'image/jpeg'&lt;/font&gt; &lt;i&gt;(length=10)&lt;/i&gt;
        &lt;i&gt;private&lt;/i&gt; 'size' &lt;font color='#888a85'&gt;=&amp;gt;&lt;/font&gt; &lt;small&gt;int&lt;/small&gt; &lt;font color='#4e9a06'&gt;90400&lt;/font&gt;
        &lt;i&gt;private&lt;/i&gt; 'error' &lt;font color='#888a85'&gt;=&amp;gt;&lt;/font&gt; &lt;small&gt;int&lt;/small&gt; &lt;font color='#4e9a06'&gt;0&lt;/font&gt;
  &lt;/pre&gt;
  </code></pre>
  
  <p>However this code:</p>
  
  <pre><code>//snip
  if(Input::hasFile('photo') {
      var_dump(Input::file('photo')-&gt;getSize()); die();
  }
  </code></pre>
  
  <p>prodices the error <code>Call to a member function getSize() on a non-object</code>.</p>
  
  <p>I have no idea how to get this to work. I got the same error when initially using the <code>move()</code> method to save the file.</p>