We are developing an OwnCloud app where we are trying to track the user who upload the file to specific folder. the hooks is working for the admin but the hook is not executing when another user upload to a shared folder. is this a permission issue ?
our hook register code. we try both hook system, but same result.
public function register() {
\OCP\Util::connectHook('OC_Filesystem', 'post_create', 'OCA\FileActivities\Controller\UserHooks', 'onFileCreate');
$reference = $this;
$callback = function (Node $node) use($reference) {
$reference->onPostCreate($node);
};
$this->fileManager->listen('\OC\Files', 'postCreate', $callback);
}
Ok to anyone searching the answer for the same, I got this figured out. as follow.
in your app.php
and in your lib/AppInfo/
The documentation is not very clear on this, after checking a few other apps with similar functions, I figured this out.