Skip to content

Conversation

@JammingBen
Copy link
Contributor

@JammingBen JammingBen commented Nov 7, 2025

Fix version downloads and 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).

And removes some ancient avatar URL logic (see opencloud-eu/opencloud#1197 (comment)).

fixes #1521

@JammingBen JammingBen self-assigned this Nov 7, 2025
Comment on lines 338 to 345
callbackFn: async ({ resource }: { resource: Resource }) => {
const { downloadURL: url } = await webdav.getFileInfo(space, resource, {
davProperties: [DavProperty.FileId, DavProperty.DownloadURL]
})
postMessageToCollabora('Action_InsertGraphic', { url })
Copy link
Contributor Author

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.

@JammingBen
Copy link
Contributor Author

JammingBen commented Nov 7, 2025

CI fails because of: opencloud-eu/opencloud#1808

@JammingBen JammingBen force-pushed the fix/download-url-prop branch from 98bfc0d to 730826b Compare November 14, 2025 10:17
@JammingBen JammingBen marked this pull request as ready for review November 14, 2025 12:08
Copilot AI review requested due to automatic review settings November 14, 2025 12:08
Copy link
Contributor

Copilot AI left a 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 downloadURL from 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).
Copy link
Contributor

@kulmann kulmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! 🥇

@JammingBen JammingBen merged commit d08283e into main Nov 17, 2025
29 checks passed
@JammingBen JammingBen deleted the fix/download-url-prop branch November 17, 2025 13:42
@JammingBen
Copy link
Contributor Author

💚 All backports created successfully

Status Branch Result
stable-4.2

Questions ?

Please refer to the Backport tool documentation

@openclouders openclouders mentioned this pull request Nov 17, 2025
1 task
openclouders pushed a commit that referenced this pull request Nov 17, 2025
fix: version downloads and remove downloadUrl dav property default
@openclouders openclouders mentioned this pull request Dec 15, 2025
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Performance: Only request downloadUrl webdav property on demand

3 participants