Skip to content

Commit

Permalink
Prevent ContentType assignation when dirs are created.
Browse files Browse the repository at this point in the history
  • Loading branch information
ganeko committed Feb 13, 2019
1 parent 883b02c commit 187db59
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/AwsS3Adapter.php
Expand Up @@ -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);
}

/**
Expand Down Expand Up @@ -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);
}

Expand Down

0 comments on commit 187db59

Please sign in to comment.