Nextcloud Callback

Hi Everyone,

I was trying to trigger a API when new file is created/ uploaded.

I’ve looked latest doc, where OCP event dispatcher I would require more info

Thanks in advance

Events — Nextcloud latest Developer Manual latest documentation maybe?

1 Like

You can simply write a listener class as written in the documentation and
register that as a callback in you Application class.
You want to listen to the OCP\Files\Events\Node\NodeCreatedEvent
and then check if the node is a directory or a file.