// Set Headers and URL for CURL
$url = "https://api.aspose.cloud/v3.0/imaging/convert?format=pdf";
$headers = [
"accept: multipart/form-data",
"Content-Type: multipart/form-data",
"Authorization: Bearer " . $token,
];
// Get the file from Storage
$data = [
"File" => new \CURLFile(
"path/to/file/" . $phone . "/" . $file
),
];
// Set Curl Options
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$response = curl_exec($ch);
//Handle Error
if (!$response) {
Log::info('Converting Error ' . curl_error($ch));
}
The CURL error logs as follows
Converting Error HTTP/2 stream 0 was not closed cleanly: INTERNAL_ERROR (err 2)
Kindly Guide me, as it was working flawlessly a day before, encountering this since yesterday. Plus failed to POST using Postman as well.