Loading inc/aws-sdk/Aws/S3/StreamWrapper.php +9 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ use Aws\Common\Exception\RuntimeException; use Aws\S3\Exception\S3Exception; use Aws\S3\Exception\NoSuchKeyException; use Aws\S3\Iterator\ListObjectsIterator; use Guzzle\Http\Mimetypes; use Guzzle\Http\EntityBody; use Guzzle\Http\CachingEntityBody; use Guzzle\Stream\PhpStreamRequestFactory; Loading Loading @@ -209,6 +210,14 @@ class StreamWrapper $params = $this->params; $params['Body'] = $this->body; // Attempt to guess the ContentType of the upload based on the // file extension of the key if (!isset($params['ContentType']) && ($type = Mimetypes::getInstance()->fromFilename($params['Key'])) ) { $params['ContentType'] = $type; } try { self::$client->putObject($params); return true; Loading Loading
inc/aws-sdk/Aws/S3/StreamWrapper.php +9 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ use Aws\Common\Exception\RuntimeException; use Aws\S3\Exception\S3Exception; use Aws\S3\Exception\NoSuchKeyException; use Aws\S3\Iterator\ListObjectsIterator; use Guzzle\Http\Mimetypes; use Guzzle\Http\EntityBody; use Guzzle\Http\CachingEntityBody; use Guzzle\Stream\PhpStreamRequestFactory; Loading Loading @@ -209,6 +210,14 @@ class StreamWrapper $params = $this->params; $params['Body'] = $this->body; // Attempt to guess the ContentType of the upload based on the // file extension of the key if (!isset($params['ContentType']) && ($type = Mimetypes::getInstance()->fromFilename($params['Key'])) ) { $params['ContentType'] = $type; } try { self::$client->putObject($params); return true; Loading