[Breaking] Files APIs update for 33

Hello fellow engineers!

We’ve updated the nextcloud/files library to version 4.0.0 in Server.
This release includes breaking API changes, so you’ll need to update your code in time for Server 33.

Summary

To improve developer experience, we’ve expanded the context object passed to file actions; it now includes additional fields such as the current folder and the current file list.
Function signatures have also changed: action handlers now use destructured parameters instead of positional array arguments.

You will have to update your APIs to be compatible for Nextcloud 33 and above.
Luckily, the migration path is quite straightforward.

Additional informations

You can find the full changelog and migration details in the repository:
https://github.com/nextcloud-libraries/nextcloud-files (4.0.0 beta)

If you have any questions, feel free to reach out to us on the Files help Talk room

Hello @skjnldsv! Thanks for posting and being transparent about this breaking change.

If you have a moment, could you take a look at an issue I’m having while upgrading my app? I cannot make any menu entries appear despite a long night of trying: Cannot get `addNewFileMenuEntry` and `registerFileAction` in v4 to work · Issue #1494 · nextcloud-libraries/nextcloud-files · GitHub

Sorry for the delay! I was on parental leave.

Glad to see it all resolved!! :blush: