App: Execute code when a new file is uploaded

Hello – New NextCloud app developer here, so I’m looking for some direction.

I want to process a file of a certain extension before it is saved to storage. In particular, when a new file is uploaded, I’d like to call an API method to process it, then save the end result instead of the original file.

Can someone point me in the right direction as to where to start? Would I need a storage wrapper and have to extend the Wrapper class for example? Are there any other apps out there that you recommend I take a look at?

Thanks!