Skip to content

Commit

Permalink
Patch S3 md5 issue
Browse files Browse the repository at this point in the history
  • Loading branch information
nicksagona committed Nov 28, 2023
1 parent 6da1aa2 commit fb11a14
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Adapter/S3.php
Original file line number Diff line number Diff line change
Expand Up @@ -466,8 +466,8 @@ public function md5File(string $filename): string|bool
{
if (file_exists($this->directory . DIRECTORY_SEPARATOR . $this->scrub($filename))) {
$fileObject = $this->client->getObject([
'Bucket' => str_replace('s3://', '', $this->directory),
'Key' => $this->scrub($filename),
'Bucket' => str_replace('s3://', '', $this->baseDirectory),
'Key' => str_replace($this->baseDirectory . '/', '', $this->directory . '/') . $this->scrub($filename),
]);

return (isset($fileObject['ETag'])) ? str_replace('"', '', $fileObject['ETag']) : false;
Expand Down

0 comments on commit fb11a14

Please sign in to comment.