feat: add width, height, crop and mode to BeforePreviewFetchedEvent
Summary
user_usage_report keeps a counter for files read.^1
The app uses
- OC_Filesystem::read hook
- Event listener (the legacy one) for IPreview::EVENT
Request for previews do not trigger the hook, hence the additional event listener. The thumbnails for a list or grid view should not count, so we need the width and height.
TODO
- [x] CI
Checklist
- Code is properly formatted
- Sign-off message is added to all commits
- [ ] Tests (unit, integration, api and/or acceptance) are included
- [ ] Screenshots before/after for front-end changes
- [ ] Documentation (manuals or wiki) has been updated or is not required
- [ ] Backports requested where applicable (ex: critical bugfixes)
Would you mind adding more details while we're at it? What I added in https://github.com/nextcloud/server/pull/37193 for admin_audit (crop, mode and mimetype).
@tcitworld added crop and mode.
Added defaults for width, height, crop and mode to keep the public api stable.
Documentation: https://github.com/nextcloud/documentation/pull/10674