-
Notifications
You must be signed in to change notification settings - Fork 25
fix: version downloads and remove downloadUrl dav property default #1559
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| callbackFn: async ({ resource }: { resource: Resource }) => { | ||
| const { downloadURL: url } = await webdav.getFileInfo(space, resource, { | ||
| davProperties: [DavProperty.FileId, DavProperty.DownloadURL] | ||
| }) | ||
| postMessageToCollabora('Action_InsertGraphic', { url }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Obviously I can't test this, but making this callback async shouldn't be an issue.
|
|
98bfc0d to
730826b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR optimizes WebDAV performance by removing downloadURL from the default DAV properties, fetching it on-demand instead (except for public links where it's needed for previews). Additionally, it removes deprecated avatar URL caching logic.
Key Changes:
- Removed
downloadURLfrom default DAV properties and added on-demand fetching - Removed deprecated avatar URL helper functions and associated tests
- Fixed version download URL handling with required username validation
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/web-client/src/webdav/constants/dav.ts | Removed DownloadURL from default DAV properties |
| packages/web-client/src/webdav/getFileUrl.ts | Refactored to fetch downloadURL on-demand and added username validation for version URLs |
| packages/web-client/src/webdav/index.ts | Added getFileInfoFactory parameter to GetFileUrlFactory |
| packages/web-client/src/webdav/listFiles.ts | Added null check for fileId to prevent comparison errors |
| packages/web-pkg/src/services/folder/loaders/loaderSpace.ts | Added downloadURL to DAV properties for public links to support previews |
| packages/web-pkg/src/services/preview/previewService.ts | Added on-demand downloadURL fetching when not present |
| packages/web-pkg/src/services/cache.ts | Marked avatarUrl getter as deprecated |
| packages/web-pkg/tests/unit/services/cache.spec.ts | Removed avatarUrl cache test |
| packages/web-app-files/src/helpers/user/avatarUrl.ts | Removed entire avatarUrl helper implementation |
| packages/web-app-files/tests/unit/helpers/user/avatarUrl.spec.ts | Removed avatarUrl tests |
| packages/web-app-files/src/helpers/user/index.ts | Removed export statement |
| packages/web-app-external/src/App.vue | Added on-demand downloadURL fetching for Collabora image insertion |
| .woodpecker.env | Updated OpenCloud commit ID |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Also removes the `downloadURL` prop from the default requested DAV properties for performance reasons. This property gets requested on demand now (with public links being an exception so we can show previews).
730826b to
7e857b6
Compare
kulmann
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! 🥇
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
fix: version downloads and remove downloadUrl dav property default
Fix version downloads and removes the
downloadURLprop from the default requested DAV properties for performance reasons. This property gets requested on demand now (with public links being an exception so we can show previews).And removes some ancient avatar URL logic (see opencloud-eu/opencloud#1197 (comment)).
fixes #1521