-
-
Notifications
You must be signed in to change notification settings - Fork 77
enh: Migrate from custom webdav v4 handling to webdav v5 with @nextcloud/files
#2312
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
2cc7d85
fix: Update packages and remove unneeded patching
susnux 4a65c8c
enh: Migrate to use webdav v5 and `@nextcloud/files` for DAV handling
susnux a5afec6
fix(PhotosPicker): Adjust picker to only show sidebar if needed
susnux bb2e953
fix: Replace `console` with our logger that also handles log levels
susnux 2ae90e0
fix: Initialize the `photosLocationFolder` on first load
susnux e547054
fix: Correctly handle abort error
artonge 1a69421
test: Wait for location to be saved
artonge 3edaf55
chore(assets): Recompile assets
nextcloud-command File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
enh: Migrate to use webdav v5 and
@nextcloud/files for DAV handling
Signed-off-by: Ferdinand Thiessen <[email protected]>
- Loading branch information
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| /** | ||
| * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors | ||
| * SPDX-License-Identifier: AGPL-3.0-or-later | ||
| */ | ||
|
|
||
| import type { WebDAVClient } from 'webdav' | ||
| import { getClient } from '@nextcloud/files/dav' | ||
|
|
||
| export const davClient: WebDAVClient = getClient() |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| /** | ||
| * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors | ||
| * SPDX-License-Identifier: AGPL-3.0-or-later | ||
| */ | ||
|
|
||
| import { getDavProperties } from '@nextcloud/files/dav' | ||
|
|
||
| /** | ||
| * Used to cache the props | ||
| */ | ||
| let props: string|null = null | ||
|
|
||
| /** | ||
| * Get the default WebDAV properties | ||
| * This is cached for performance reasons | ||
| */ | ||
| export const getDefaultDavProps = () => { | ||
| if (props === null) { | ||
| props = getDavProperties() | ||
| } | ||
| return props | ||
| } | ||
|
|
||
| /** | ||
| * @param extraProps - Extra properties to add to the DAV request. | ||
| */ | ||
| export function getPropFind(extraProps: string[] = []): string { | ||
| return `<?xml version="1.0"?> | ||
| <d:propfind xmlns:d="DAV:" | ||
| xmlns:oc="http://owncloud.org/ns" | ||
| xmlns:nc="http://nextcloud.org/ns" | ||
| xmlns:ocs="http://open-collaboration-services.org/ns"> | ||
| <d:prop> | ||
| ${getDefaultDavProps()} | ||
| ${extraProps.join('\n')} | ||
| </d:prop> | ||
| </d:propfind>` | ||
| } |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.