Skip to content

Commit 8dc135b

Browse files
authored
Merge pull request #38 from daniellienert/bugfix/use-correct-header-keys
BUGFIX: Use correct header keys for Content-Length and Content-Type
2 parents 4d77ab1 + 2fdbad5 commit 8dc135b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Classes/S3Storage.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -409,8 +409,8 @@ protected function importTemporaryFile($temporaryPathAndFilename, $collectionNam
409409
$this->s3Client->putObject([
410410
'Bucket' => $this->bucketName,
411411
'Body' => fopen($temporaryPathAndFilename, 'rb'),
412-
'ContentLength' => $resource->getFileSize(),
413-
'ContentType' => $resource->getMediaType(),
412+
'Content-Length' => $resource->getFileSize(),
413+
'Content-Type' => $resource->getMediaType(),
414414
'Key' => $objectName
415415
]);
416416
$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__));

0 commit comments

Comments
 (0)