diff options
Diffstat (limited to 'lib/private/Files/ObjectStore')
-rw-r--r-- | lib/private/Files/ObjectStore/Swift.php | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/lib/private/Files/ObjectStore/Swift.php b/lib/private/Files/ObjectStore/Swift.php index 7e4654b6eb2..fd416157635 100644 --- a/lib/private/Files/ObjectStore/Swift.php +++ b/lib/private/Files/ObjectStore/Swift.php @@ -76,14 +76,9 @@ class Swift implements IObjectStore { * @throws \Exception from openstack lib when something goes wrong */ public function writeObject($urn, $stream) { - $handle = $stream; - - $meta = stream_get_meta_data($stream); - if (!(isset($meta['seekable']) && $meta['seekable'] === true)) { - $tmpFile = \OC::$server->getTempManager()->getTemporaryFile('swiftwrite'); - file_put_contents($tmpFile, $stream); - $handle = fopen($tmpFile, 'rb'); - } + $tmpFile = \OC::$server->getTempManager()->getTemporaryFile('swiftwrite'); + file_put_contents($tmpFile, $stream); + $handle = fopen($tmpFile, 'rb'); $this->getContainer()->createObject([ 'name' => $urn, |