diff options
-rw-r--r-- | lib/Controller/WopiController.php | 3 |
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) { |