Discussions
Photo uploading problem
Photo uploading (for future video generation with a photo avatar) stopped working.
I send an upload request, and after 20 seconds, I get error 55.
My code has NOT changed in the last 3 months - could something have changed on your end in the last few days?
Code:
$ch = curl_init($endpoint);
$opts = [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => $header,
CURLOPT_POSTFIELDS => $pf,
CURLOPT_TIMEOUT => 30,
CURLOPT_SSL_VERIFYPEER => true,
CURLOPT_CAINFO => DIR . '/../php-bin/cacert.pem'
];
logEvent("", "Request to $endpoint — CURL OPTIONS: " . printParams($opts, true)); //true));
curl_setopt_array($ch, $opts);
Log:
[2025-12-14 00:03:14] [email protected] Request to https://upload.heygen.com/v1/talking_photo — CURL OPTIONS: Array
(
[19913] => 1
[47] => 1
[10023] => Array
(
[0] => X-Api-Key:...U0MjgyOQ==
[1] => Content-Type: image/jpeg
)
[10015] => [binary:248008 bytes]
[13] => 30
[64] => 1
[10065] => D:\Docs\Internet\Site\promo-master.art\localhost\php-bin/../php-bin/cacert.pem
)
[2025-12-14 00:03:34] [email protected] ❌ SERVER: Error 55: Recv failure: Connection was reset в D:\Docs\Internet\Site\promo-master.art\localhost\php-bin\gen.php:859: #0 D:\Docs\Internet\Site\promo-master.art\localhost\php-bin\gen.php(285): uploadImage()