This function does not mix with `curl_file_create` (`CURLFile` object) and `CURLOPT_POSTFIELDS`. Took me forever to figure out, but essentially I was getting an "Invalid filename" PHP warning and the files weren't being sent. I was able to correct the issue in a matter like so:
curl_setopt_array($curl, $curlOpts);
curl_setopt($curl, CURLOPT_POSTFIELDS, $postFields);
I removed the `$postFields` value from `$curlOpts` and set it separately using `curl_setopt`.