private function doMultipartUpload ($endpoint, $type, $stream, array $extra = [])
    {
        return json_decode(
            $this->client->send(
                new Request(
                    'POST',
                    Uri::withQueryValue(new Uri($endpoint), 'type', $type),
                    [],
                    new MultipartStream(array_merge([
                        [
                            'name'     => 'media',
                            'contents' => $stream,
                        ],
                    ], $extra))
                )
            )->getBody()
        );
    }
private function doMultipartUpload ($endpoint, $type, $stream, array $extra = [])
    {
        return json_decode(
            $this->client->send(
                new Request(
                    'POST',
                    Uri::withQueryValue(new Uri($endpoint), 'type', $type),
                    [],
                    new MultipartStream(array_merge([
                        [
                            'name'     => 'media',
                            'contents' => $stream,
                        ],
                    ], $extra))
                )
            )->getBody()
        );
    }
private function doMultipartUpload ( $ endpoint , $ type , $ stream , array $ extra = [ ] ) { return json_decode ( $ this -> client -> send ( new Request ( 'POST' , Uri :: withQueryValue ( new Uri ( $ endpoint ) , 'type' , $ type ) , [ ] , new MultipartStream ( array_merge ( [ [ 'name' => 'media' , 'contents' => $ stream , ] , ] , $ extra ) ) ) ) -> getBody ( ) ) ; }
Performs a multipart upload to the WeChat API. Additional multipart fields can be added in if required.

@param string   $endpoint
@param string   $type
@param resource $stream
@param array    $extra

@return \stdClass
Performs a multipart upload to the WeChat API . Additional multipart fields can be added in if required .