Skip to content

Commit b92345f

Browse files
committed
Fixed writeStream error
1 parent b4838a3 commit b92345f

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/QiniuAdapter.php

+1-6
Original file line numberDiff line numberDiff line change
@@ -589,12 +589,7 @@ public function writeStream(string $path, $contents, Config $config): void
589589
$mime = $config->get('mime', 'application/octet-stream');
590590
$checkCrc = $config->get('checkCrc', false);
591591

592-
$resourceData = '';
593-
while (!feof($contents)) {
594-
$resourceData = $resourceData . fread($contents, 1024);
595-
}
596-
597-
[$ret, $error] = $this->qiniuPutFile($token, $path, $resourceData, $params, $mime, $checkCrc);
592+
[$ret, $error] = $this->qiniuPutFile($token, $path, $contents, $params, $mime, $checkCrc);
598593

599594
if ($error !== null) {
600595
$this->logQiniuError($error);

0 commit comments

Comments
 (0)