Skip to content

Commit 6716dc7

Browse files
ekasitkhaphan
authored andcommitted
Add swift download options
1 parent 5e20f72 commit 6716dc7

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/ObjectStore/v1/Models/Object.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,16 +108,18 @@ public function retrieve()
108108
* distinct from fetching its metadata (a `HEAD` request). The body of an object is not fetched by default to
109109
* improve performance when handling large objects.
110110
*
111+
* @param array $data {@see \OpenStack\ObjectStore\v1\Api::getObject}
112+
*
111113
* @return StreamInterface
112114
*/
113-
public function download(): StreamInterface
115+
public function download(array $data = []): StreamInterface
114116
{
115-
/** @var ResponseInterface $response */
116-
$response = $this->executeWithState($this->api->getObject());
117+
$response = $this->execute($this->api->getObject(), $data + ['containerName' => $this->containerName]);
117118
$this->populateHeaders($response);
118119
return $response->getBody();
119120
}
120121

122+
121123
/**
122124
* {@inheritdoc}
123125
*/

0 commit comments

Comments
 (0)