diff --git a/src/AwsS3Adapter.php b/src/AwsS3Adapter.php index e58c161..c015b27 100644 --- a/src/AwsS3Adapter.php +++ b/src/AwsS3Adapter.php @@ -217,7 +217,7 @@ public function deleteDir($dirname) */ public function createDir($dirname, Config $config) { - return $this->upload($dirname . '/', '', $config); + return $this->upload($dirname . '/', null, $config); } /** @@ -580,7 +580,7 @@ protected function upload($path, $body, Config $config) $options = $this->getOptionsFromConfig($config); $acl = array_key_exists('ACL', $options) ? $options['ACL'] : 'private'; - if ( ! isset($options['ContentType'])) { + if ( ! is_null($body) && ! isset($options['ContentType'])) { $options['ContentType'] = Util::guessMimeType($path, $body); }