Nextcloud in which source file is file uploading handled -


i going make app. stuck in 1 issue. unable find in file of nextcloud, codes available uploads file. want find file in file uploading codes situated.

i going make app make duplicate of uploaded file , save in same directory changed name.

the public api handling files lives in \ocp\files namespace, implementation in \oc\files namespace (https://github.com/nextcloud/server/tree/master/lib/private/files).

rather modifying code should use hooks functionality (never use classes or functions in \oc\* namespace!): https://docs.nextcloud.com/server/12/developer_manual/app/hooks.html. way can execute own code when file created or updated etc.

i guess need postwrite hook. sample code (untested):

\oc::$server->getrootfolder()->listen('\oc\files', 'postwrite', function(\ocp\files\node $node) {     $node->copy('my/path'); }); 

Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -