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
Conversation
NextCloud is sending application/octet-stream for files in WebDAV. We are now infering the mime/class from the filename.
ext := filepath.Ext(oldPath) | ||
base := strings.TrimSuffix(oldPath, ext) | ||
suffix := inst.Translate("File copy Suffix") | ||
newPath = fmt.Sprintf("%s (%s)%s", base, suffix, ext) |
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.
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?
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.
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.
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.
I understand. Let's see if we really need it then.
No description provided.