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'];