Repository navigation
Conversation
A `#` or `?` in the destination was taken as URL fragment or query, so the MKCOL of folder uploads targeted a truncated URL and the following file uploads failed. Build the client from the encoded root, like `upload()` already does, and keep the decoded values for uploads and events. Fixes nextcloud-libraries#1964 Assisted-by: ClaudeCode:claude-sonnet-5-5 Assisted-by: ClaudeCode:claude-opus-5-5 Assisted-by: Codex:gpt-5.6 Assisted-by: Grok:grok-4.6 Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
solracsf
force-pushed
the
fix/batch-upload-encode-root
branch
from
October 22, 2026 14:07
32dc226 to
4422f52
Compare
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #1964
Fixes nextcloud/server#62716
batchUpload()built its WebDAV client from the decoded root, so a#or?in the destination path was read as a URL fragment or query. The MKCOL of a folder upload went to a truncated URL (.../files/admin#test/picked/hit.../files/admin, a 405) and the file uploads then failed with 404.upload()already encodes its URL; the client is now built from the encoded root in the same way. TheUploadobjects, events and logs keep the decoded values.Tests added in
__tests__/uploader.spec.tsassert the full MKCOL and PUT URLs for#,?,%, spaces, non-ASCII, nested folders and a public share root. They fail on the previous code and pass now.vitest runpasses. Also checked against a throwaway local HTTP server with the real fetch and WebDAV client.npm run lintdoes not run locally on the current main (ESLint 10 vs the.eslintrc.jsonconfig), so lint was not run.The same problem exists on the server for drag and drop, fixed in nextcloud/server#65789.