title: PHP cURL file get contents is always empty
body: <p>I've created an endpoint in Paw (and/or Postman) for handling file uploads. It works great!</p>
  
  <p><a href="https://i.stack.imgur.com/rBu7p.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rBu7p.png" alt="enter image description here"></a></p>
  
  <p>It's pretty simple. And in my application I can do something like:</p>
  
  <pre><code>echo file_get_contents('php://input');
  </code></pre>
  
  <p>And it will print out an encoded representation of the image/file (a cute kitten).</p>
  
  <p>The problem is, I cannot seem to reproduce this behaviour using just cURL (Current application uses Guzzle).</p>
  
  <p>When I try something like:</p>
  
  <pre><code>$target_url = 'http://my-document-handling-service.net:8000/documents';
  
  $request = curl_init($target_url);
  
  curl_setopt($request, CURLOPT_POST, true);
  curl_setopt($request, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($request, CURLOPT_POSTREDIR, 3);
  
  curl_setopt(
      $request,
      CURLOPT_POSTFIELDS,
      array(
        'file' =&gt; '/Users/xxxxxxx-xxxx/Documents/kitten-test-upload-image-1.jpg'
      ));
  
  echo curl_exec($request);
  
  curl_close($request);
  </code></pre>
  
  <p>The body (<code>file_get_contents()</code>) is always empty. I don't really understand cURL I've always just used Guzzle - but now I have to use cURL and I can't get the body.</p>
  
  <p>What am I doing wrong?</p>