diff --git a/src/OSS/OssClient.php b/src/OSS/OssClient.php index d7f73df..fa9cefd 100644 --- a/src/OSS/OssClient.php +++ b/src/OSS/OssClient.php @@ -3047,6 +3047,13 @@ private function auth($options) $headers[self::OSS_CONTENT_MD5] = base64_encode(md5($options[self::OSS_CONTENT], true)); } + if (isset($options[self::OSS_REGISTERED_STREAMING_READ_CALLBACK])){ + $request->register_streaming_read_callback($options[self::OSS_REGISTERED_STREAMING_READ_CALLBACK]); + } + if (isset($options[self::OSS_REGISTERED_STREAMING_WRITE_CALLBACK])){ + $request->register_streaming_write_callback($options[self::OSS_REGISTERED_STREAMING_WRITE_CALLBACK]); + } + if (isset($options[self::OSS_CALLBACK])) { $headers[self::OSS_CALLBACK] = base64_encode($options[self::OSS_CALLBACK]); } @@ -3651,6 +3658,9 @@ public function setConnectTimeout($connectTimeout) const OSS_LIST_TYPE = "list-type"; + const OSS_REGISTERED_STREAMING_READ_CALLBACK = 'registered-streaming-read-callback'; + const OSS_REGISTERED_STREAMING_WRITE_CALLBACK = 'registered-streaming-write-callback'; + // Domain Types const OSS_HOST_TYPE_NORMAL = "normal";//http://bucket.oss-cn-hangzhou.aliyuncs.com/object const OSS_HOST_TYPE_IP = "ip"; //http://1.1.1.1/bucket/object