From b2d47a2ed675524f8b346ea1e136459622f8d31a Mon Sep 17 00:00:00 2001 From: leite Date: Tue, 1 Dec 2015 13:13:22 -0200 Subject: [PATCH] fix wrong mimetype --- .../OnePica/ImageCdn/Model/Adapter/Amazons3/Wrapper.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/community/OnePica/ImageCdn/Model/Adapter/Amazons3/Wrapper.php b/app/code/community/OnePica/ImageCdn/Model/Adapter/Amazons3/Wrapper.php index 435dfc4..3c07af3 100644 --- a/app/code/community/OnePica/ImageCdn/Model/Adapter/Amazons3/Wrapper.php +++ b/app/code/community/OnePica/ImageCdn/Model/Adapter/Amazons3/Wrapper.php @@ -140,6 +140,7 @@ public function uploadFile($bucket_name, $s3_path, $fs_path, $web_accessible = f if(!isset($headers['Content-Type'])) { $ext = pathinfo($fs_path, PATHINFO_EXTENSION); + if (empty($ext)) $ext = pathinfo($s3_path, PATHINFO_EXTENSION); $headers['Content-Type'] = isset($this->mimeTypes[$ext]) ? $this->mimeTypes[$ext] : 'application/octet-stream'; } $request['content-type'] = $headers['Content-Type'];