Added resumable upload tests

This commit is contained in:
Alex
2025-08-27 21:26:33 +03:00
parent 869c254275
commit 94ec907506
5 changed files with 92 additions and 2 deletions
+2
View File
@@ -446,6 +446,8 @@ class Api
}
/**
* Uploads a file to the specified URL.
*
* @param string $uploadUrl The target URL for the upload.
* @param resource $fileHandle A stream resource pointing to the file.
* @param string $fileName The desired file name for the upload.
+2
View File
@@ -181,7 +181,9 @@ final readonly class Client implements ClientApiInterface
while (!feof($fileResource)) {
$chunk = fread($fileResource, $chunkSize);
if ($chunk === false) {
// @codeCoverageIgnoreStart
throw new RuntimeException('Failed to read chunk from file stream.');
// @codeCoverageIgnoreEnd
}
$chunkLength = strlen($chunk);