Skip to content

Commit

Permalink
BUGFIX: Use correct header keys for Content-Length and Content-Type
Browse files Browse the repository at this point in the history
  • Loading branch information
daniellienert committed Jan 5, 2021
1 parent 4d77ab1 commit 2fdbad5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Classes/S3Storage.php
Original file line number Diff line number Diff line change
Expand Up @@ -409,8 +409,8 @@ protected function importTemporaryFile($temporaryPathAndFilename, $collectionNam
$this->s3Client->putObject([
'Bucket' => $this->bucketName,
'Body' => fopen($temporaryPathAndFilename, 'rb'),
'ContentLength' => $resource->getFileSize(),
'ContentType' => $resource->getMediaType(),
'Content-Length' => $resource->getFileSize(),
'Content-Type' => $resource->getMediaType(),
'Key' => $objectName
]);
$this->systemLogger->info(sprintf('Successfully imported resource as object "%s" into bucket "%s" with SHA1 hash "%s"', $objectName, $this->bucketName, $resource->getSha1() ?: 'unknown'), LogEnvironment::fromMethodName(__METHOD__));
Expand Down

0 comments on commit 2fdbad5

Please sign in to comment.