diff --git a/StorageBundle/Adaptors/S3Storage.php b/StorageBundle/Adaptors/S3Storage.php index 69f89f4..4ad420c 100644 --- a/StorageBundle/Adaptors/S3Storage.php +++ b/StorageBundle/Adaptors/S3Storage.php @@ -40,6 +40,11 @@ class S3Storage implements StorageAdaptor ]); } + public function getClient() + { + return $this->client; + } + public function mode($name) { if ($name == 'public') return self::MODE_PUBLIC; @@ -63,8 +68,10 @@ class S3Storage implements StorageAdaptor protected function getPrefix($prefix = null) { $ret = ''; - if (isset($this->config['path'])) { + if (isset($this->config['path']) && !empty($this->config['path'])) + { $ret = trim($this->config['path'], '/').'/'; + if (trim($ret) == '/') $ret = ''; } if (!is_null($prefix)) { $ret = ltrim($prefix, '/');