diff --git a/src/SwiftAdapter.php b/src/SwiftAdapter.php index fc6bc24..fce62a7 100644 --- a/src/SwiftAdapter.php +++ b/src/SwiftAdapter.php @@ -4,16 +4,17 @@ use GuzzleHttp\Psr7\Stream; use GuzzleHttp\Psr7\StreamWrapper; -use League\Flysystem\Util; -use League\Flysystem\Config; use League\Flysystem\Adapter\AbstractAdapter; +use League\Flysystem\Adapter\CanOverwriteFiles; +use League\Flysystem\Adapter\Polyfill\NotSupportingVisibilityTrait; +use League\Flysystem\Adapter\Polyfill\StreamedCopyTrait; +use League\Flysystem\Config; +use League\Flysystem\Util; use OpenStack\Common\Error\BadResponseError; use OpenStack\ObjectStore\v1\Models\Container; use OpenStack\ObjectStore\v1\Models\StorageObject; -use League\Flysystem\Adapter\Polyfill\NotSupportingVisibilityTrait; -use League\Flysystem\Adapter\Polyfill\StreamedCopyTrait; -class SwiftAdapter extends AbstractAdapter +class SwiftAdapter extends AbstractAdapter implements CanOverwriteFiles { use StreamedCopyTrait; use NotSupportingVisibilityTrait; @@ -87,7 +88,7 @@ public function update($path, $contents, Config $config) */ public function updateStream($path, $resource, Config $config) { - return $this->write($path, new Stream($resource), $config, Util::getStreamSize($resource)); + return $this->writeStream($path, $resource, $config); } /**