title: curl not sending image attachment
body: <pre><code>$accessToken = 'ZDJjNDRlZDIwNDVhYzIxYzAyZDQxYzNkMDJmODdmZDc4MTQzYzA5MWFjOTk4NDE1MjUyZWMxYjUwMGUzNmE4ZQ';
  $headers = array("Authorization: Bearer ". $accessToken);
  $uploadfile="images/a.png"; 
  $curl = curl_init();
  curl_setopt_array($curl, array(CURLOPT_HTTPHEADER =&gt; $headers,
      CURLOPT_RETURNTRANSFER =&gt; 1,
      CURLOPT_URL =&gt; 'https://www.abc.be/api/entranceticket/create',
      CURLOPT_POST =&gt; 1,
      CURLOPT_SSL_VERIFYHOST =&gt; FALSE,
      CURLOPT_SSL_VERIFYPEER =&gt; FALSE,
      CURLOPT_POSTFIELDS =&gt; array(
      'api_entrance_ticket[productName]' =&gt; 'Event1',
      'api_entrance_ticket[reference]' =&gt; 'M1-1',
      'api_entrance_ticket[description]' =&gt; 'Event1',
      'api_entrance_ticket[price]' =&gt; '5',
      'api_entrance_ticket[shop]' =&gt; 'SJK305801',
      'api_entrance_ticket[ticketWindowOpening]' =&gt; '2014-09-03 00:00:00',
      'api_entrance_ticket[ticketWindowClosing]' =&gt; '2014-09-23 23:59:00',
      'api_entrance_ticket[isNumbered]' =&gt; '1',
      'api_entrance_ticket[image]' =&gt; '@'.$uploadfile ,
      'api_entrance_ticket[sizeX]' =&gt; '10',
      'api_entrance_ticket[sizeY]' =&gt; '8'
      )
  
  ));
  
  
  // Send the request &amp; save response to $resp
  $resp = curl_exec($curl);
  // Close request to clear up some resources
  if(!curl_exec($curl)){
      die('Error: "' . curl_error($curl) . '" - Code: ' . curl_errno($curl));
  }
  curl_close($curl);
  
  echo $resp;
  </code></pre>
  
  <p>When using this script on the hosting of the api owner everything works.  When we use it at our hosting to send data to the api, the image is not sent.  They receive the curl call but refuse it because no image is present.</p>
  
  <p>Any idea why this isn't working at our side?</p>
  
  <p>Don't look at the SSL FALSE, we're connecting to a non secure test environment.  </p>
  
  <p>EDIT: changed to '@'.$uploadfile </p>