title: File Upload to Dropbox from FORM with PHP
body: <p>I am so close.  I am trying to create a form that will upload a file to my Dropbox, and I can get it to work using a file on the server with the code here:</p>
  
  <pre><code>$path = 'render.png';
  $fp = fopen($path, 'rb');
  ch = curl_init('https://content.dropboxapi.com/2/files/upload');
  curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
  curl_setopt($ch, CURLOPT_PUT, true);
  curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
  curl_setopt($ch, CURLOPT_INFILE, $fp);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($ch);curl_close($ch);
  echo $response;
  </code></pre>
  
  <p>I was sure this would work, but nope.....</p>
  
  <pre><code>$fp = fopen($_FILES['file'], 'rb');
  </code></pre>
  
  <p>Anyone have a quick fix for this?</p>