diff --git a/src/Client.php b/src/Client.php index fa6538e..9b95a08 100644 --- a/src/Client.php +++ b/src/Client.php @@ -234,7 +234,7 @@ public function upload(string $uri, array $files = [], array $form = [], array $ $multipart = []; foreach ($files as $name => $contents) { - $contents = \is_resource($contents) ?: \fopen($contents, 'r'); + $contents = \is_resource($contents) ? $contents : \fopen($contents, 'r'); $multipart[] = \compact('name', 'contents'); }