diff options
author | Vitor Mattos <vitor@php.rio> | 2019-04-26 10:36:37 -0300 |
---|---|---|
committer | Vitor Mattos <vitor@php.rio> | 2019-04-26 10:36:37 -0300 |
commit | 09f7de0a39fec057dda44f25542a3033ba042db3 (patch) | |
tree | e80feb78eaf0efc9d7b22c64ced98813a40035ee /lib/private/Files/ObjectStore | |
parent | 35465ca90c9a7e90e0836fd9def62b0e7a6bf81c (diff) | |
parent | afbf6ef0901ca2fbe23be898c3ee7c0660da4244 (diff) | |
download | nextcloud-server-09f7de0a39fec057dda44f25542a3033ba042db3.tar.gz nextcloud-server-09f7de0a39fec057dda44f25542a3033ba042db3.zip |
Merge remote-tracking branch 'nextcloud/master' into bugfix-create-database-user
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, |