title: Curl POST upload file request returns false
body: <p>I'm trying to use the gfycat API to create a gfycat with a file upload through curl with php but it doesn't work and var_dump($response) gives me bool(false).</p>
  
  <p><strong>My Code:</strong></p>
  
  <pre><code>$file_path = $target_dir.$newfilename;
  $cFile = curl_file_create($file_path);
  $data = array(
       "file" =&gt; $cFile,
  );
  $target_url = "https://filedrop.gfycat.com";
  
  $ch = curl_init();
  curl_setopt($ch, CURLOPT_URL, $target_url);
  curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
  curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  curl_setopt($ch, CURLOPT_HTTPHEADER, array(
       "Content-Type: multipart/form-data"
  ));            
  
  $response = curl_exec($ch);
  var_dump($response); // bool(false) here
  
  curl_close($ch);
  </code></pre>
  
  <p>Help would be really appreciated. Thanks.</p>