Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/richdocuments.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Controller/WopiController.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Controller/WopiController.php b/lib/Controller/WopiController.php
index 561305e0..c1e3eb86 100644
--- a/lib/Controller/WopiController.php
+++ b/lib/Controller/WopiController.php
@@ -184,6 +184,9 @@ class WopiController extends Controller {
$userFolder = $this->rootFolder->getUserFolder($res['owner']);
$file = $userFolder->getById($fileId)[0];
$content = fopen('php://input', 'rb');
+ // Setup the FS which is needed to emit hooks (versioning).
+ \OC_Util::tearDownFS();
+ \OC_Util::setupFS($res['owner']);
$file->putContent($content);
return new JSONResponse();
} catch (\Exception $e) {