From f5db14dd74ac5825426808b66ba4f5ae8efef610 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 13 Nov 2024 22:31:13 +0100 Subject: [PATCH] pass propper parameter to hook cleanUpDocument --- restapi/index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/restapi/index.php b/restapi/index.php index cf251d832..b8621008d 100644 --- a/restapi/index.php +++ b/restapi/index.php @@ -795,7 +795,7 @@ class RestapiController { /* {{{ */ return $response->withJson(array('success'=>false, 'message'=>'Upload failed', 'data'=>''), 500); } else { if($controller->hasHook('cleanUpDocument')) { - $controller->callHook('cleanUpDocument', $document, $file); + $controller->callHook('cleanUpDocument', $document, ['ѕource'=>'restapi', 'type'=>$userfiletype, 'name'=>$origfilename]); } // Send notification to subscribers of folder. if($notifier) { @@ -967,7 +967,7 @@ class RestapiController { /* {{{ */ } else { unlink($temp); if($controller->hasHook('cleanUpDocument')) { - $controller->callHook('cleanUpDocument', $document, $file_info); + $controller->callHook('cleanUpDocument', $document, ['ѕource'=>'restapi', 'type'=>$userfiletype, 'name'=>$origfilename]); } // Send notification to subscribers. if($notifier) {