I am wanting to send a file via http POST using PHP and cURL.
The form POST was working ok with basic fields besides the file being posted with \'application/json\'.
You need to build query string for data to be posted. Use http_build_query
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));