imagekit-developer / imagekit-php

PHP SDK for ImageKit.io API.
https://imagekit.io
MIT License
42 stars 14 forks source link

Status code must be an integer value between 1xx and 5xx. #58

Open NTT1906 opened 1 year ago

NTT1906 commented 1 year ago
$img = file_get_contents(__DIR__."/sample_image.jpeg");
$encodedImageData = base64_encode($img);

$uploadFile = $imageKit->uploadFile([
    'file' => $encodedImageData,
    'fileName' => 'sample.jpeg',
    'folder' => 'sample-folder',
    'tags' => implode(['abd', 'def']),
    'useUniqueFileName' => false,
    'customCoordinates' => implode(',', ['10', '10', '100', '100'])
]);
var_dump($uploadFile);
object(ImageKit\Utils\Response)#53 (3) {
  ["error"]=>
  string(57) "Status code must be an integer value between 1xx and 5xx."
  ["result"]=>
  NULL
  ["responseMetadata"]=>
  NULL
}

The status seems to be 0?

The solutions in spatie/crawler/issues/271 don't work as they failed to patch.

joykumarbera commented 10 months ago

same issue i have