From 0ded0d4a7a1e85d38d8597fd38623ff46e2d86b9 Mon Sep 17 00:00:00 2001 From: Christoph Lehmann Date: Wed, 9 Feb 2022 17:35:56 +0100 Subject: [PATCH] Workaround: Wrong content-type when resource:copy to Minio This is a workaround for https://github.com/flownative/flow-aws-s3/issues/56 --- Classes/S3Storage.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Classes/S3Storage.php b/Classes/S3Storage.php index 1f5af15..52f8f6a 100644 --- a/Classes/S3Storage.php +++ b/Classes/S3Storage.php @@ -398,6 +398,9 @@ protected function importTemporaryFile($temporaryPathAndFilename, $collectionNam $resource->setSha1($sha1Hash); $resource->setMd5($md5Hash); + // Workaround for https://github.com/flownative/flow-aws-s3/issues/56 + $resource->setMediaType(mime_content_type($temporaryPathAndFilename)); + try { $this->s3Client->headObject([ 'Bucket' => $this->bucketName,