Skip to content
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

Allow to interact with a NextCloud via WebDAV #4392

Merged
merged 14 commits into from May 20, 2024
Merged

Allow to interact with a NextCloud via WebDAV #4392

merged 14 commits into from May 20, 2024

Conversation

nono
Copy link
Member

@nono nono commented May 2, 2024

No description provided.

pkg/webdav/webdav.go Outdated Show resolved Hide resolved
@nono nono marked this pull request as ready for review May 15, 2024 14:47
@nono nono requested a review from a team as a code owner May 15, 2024 14:47
web/remote/nextcloud.go Show resolved Hide resolved
model/nextcloud/nextcloud.go Show resolved Hide resolved
model/nextcloud/nextcloud.go Show resolved Hide resolved
Comment on lines +144 to +147
ext := filepath.Ext(oldPath)
base := strings.TrimSuffix(oldPath, ext)
suffix := inst.Translate("File copy Suffix")
newPath = fmt.Sprintf("%s (%s)%s", base, suffix, ext)
Copy link
Member

Choose a reason for hiding this comment

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

If I'm not mistaken, this means we can't make multiple copy requests for the same file without passing a Name as all copies would have the same suffix and the request to NC will fail with a 412 response code.
Can't we use the same mechanism we use for copies on our side?

Copy link
Member Author

Choose a reason for hiding this comment

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

You are correct. Technically, we can use the same mechanism, but NextCloud is slow (a few hundred milliseconds per call), and this mechanism adds more calls, and will make things slower. I don't really know if it is a good idea or not to use it here.

Copy link
Member

Choose a reason for hiding this comment

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

I understand. Let's see if we really need it then.

@nono nono merged commit 005fc75 into master May 20, 2024
4 checks passed
@nono nono deleted the nextcloud branch May 20, 2024 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants