feat(files): add WebDAV BDELETE for bulk deletions - #64674
Closed
BarryOfficeEU wants to merge 2 commits into
Closed
BarryOfficeEU wants to merge 2 commits into
BarryOfficeEU wants to merge 2 commits into
Conversation
Add a bounded BDELETE WebDAV method for deleting selected files in batches. Each target is deleted through the normal DAV unbind lifecycle without nested HTTP requests or mutation of the server request/response context. Keep the feature behind bulk_delete.enabled and advertise the batch limit through capabilities so Files can fall back to individual DELETE requests when the feature is disabled or unavailable. Support Ticket#96104279 See also: #64611 Assisted-by: ChatGPT:GPT-5.6-Sol
BarryOfficeEU
requested review from
CarlSchwan,
come-nc,
kristian-zendato,
salmart-dev and
sorbaugh
and removed request for
a team
September 23, 2026 10:29
Author
|
@icewind1991 here is an updated PR that addresses your review comments from #64611 |
icewind1991
requested changes
Sep 23, 2026
icewind1991
left a comment
Member
There was a problem hiding this comment.
Please use the existing sabre xml parsing/encoding methods instead
Member
|
And this is still not following the AI policy: https://github.com/nextcloud/.github/blob/master/AI_POLICY.md |
Signed-off-by: Barry de Graaff <info@barrydegraaff.nl> Signed-off-by: Barry de Graaff <info@barrydegraaff.nl>
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.
Add a bounded BDELETE WebDAV method for deleting selected files in batches. Each target is deleted through the normal DAV unbind lifecycle without nested HTTP requests or mutation of the server request/response context.
Keep the feature behind bulk_delete.enabled and advertise the batch limit through capabilities so Files can fall back to individual DELETE requests when the feature is disabled or unavailable.
BDLETE-proof.mp4
Support Ticket#96104279
See also: #64611
Reviewer feedback from PR64611 addressed
1. API shape
The previous JSON
POST /remote.php/dav/bulk-deleteendpoint is removed. The implementation is now a WebDAV method handled by the DAV server.2. DAV-shaped bulk deletion
The new method is
BDELETE. Its request follows the Exchange-style structure:The method is advertised through SabreDAV's
getHTTPMethods()API. It returns 204 when every target succeeds and 207 Multi-Status when a target fails.Reference supplied for review: Microsoft Exchange Server 2003 BDELETE documentation.
3. Request multiplexing
The old implementation created synthetic DELETE requests, changed the Sabre server's request/response/transaction state and re-entered
invokeMethod()for every item. None of that remains.BDELETE is one real DAV request. For each validated target it performs the normal unbind lifecycle directly:
beforeUnbindafterUnbindThis keeps file permission checks, storage deletion and trash handling in the existing node/storage code without repeatedly invoking request-level plugins.
Assisted-by: ChatGPT:GPT-5.6-Sol