summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/Files/ObjectStore/S3ObjectTrait.php13
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/private/Files/ObjectStore/S3ObjectTrait.php b/lib/private/Files/ObjectStore/S3ObjectTrait.php
index 6fb12265cb7..4bfa08a3e59 100644
--- a/lib/private/Files/ObjectStore/S3ObjectTrait.php
+++ b/lib/private/Files/ObjectStore/S3ObjectTrait.php
@@ -49,12 +49,15 @@ trait S3ObjectTrait {
'Bucket' => $this->bucket,
'Key' => $urn
]);
- $command['@http']['stream'] = true;
- $result = $client->execute($command);
- /** @var StreamInterface $body */
- $body = $result['Body'];
+ $request = \Aws\serialize($command);
+ $opts = [
+ 'http' => [
+ 'header' => $request->getHeaders()
+ ]
+ ];
- return $body->detach();
+ $context = stream_context_create($opts);
+ return fopen($request->getUri(), 'r', false, $context);
}
/**