Skip to content

Commit 5ef761c

Browse files
authored
Merge pull request gliterd#5 from kenrowland/add-read-support
Add read support
2 parents 6bd5f64 + bf93463 commit 5ef761c

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/BackblazeAdapter.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,14 @@ public function updateStream($path, $resource, Config $config)
8686
*/
8787
public function read($path)
8888
{
89-
return false;
89+
$file = $this->getClient()->getFile([
90+
'BucketName' => $this->bucketName,
91+
'FileName' => $path
92+
]);
93+
$fileContent = $this->getClient()->download([
94+
'FileId' => $file->getId()
95+
]);
96+
return ['contents' => $fileContent];
9097
}
9198

9299
/**

0 commit comments

Comments
 (0)