From ff1772f4bcf4f901157bd4d5758933ccb359c679 Mon Sep 17 00:00:00 2001 From: provokateurin Date: Thu, 16 Oct 2025 12:26:35 +0200 Subject: [PATCH] fix(FilesDropPlugin): Allow MKCOL for file drop to upload folders Signed-off-by: provokateurin --- apps/dav/lib/Files/Sharing/FilesDropPlugin.php | 9 --------- 1 file changed, 9 deletions(-) diff --git a/apps/dav/lib/Files/Sharing/FilesDropPlugin.php b/apps/dav/lib/Files/Sharing/FilesDropPlugin.php index 796950fb67f..d414a337820 100644 --- a/apps/dav/lib/Files/Sharing/FilesDropPlugin.php +++ b/apps/dav/lib/Files/Sharing/FilesDropPlugin.php @@ -113,7 +113,6 @@ class FilesDropPlugin extends ServerPlugin { $rootPath = substr($path, 0, strpos($path, $token) + strlen($token)); // e.g /Folder/image.jpg $relativePath = substr($path, strlen($rootPath)); - $isRootUpload = substr_count($relativePath, '/') === 1; // Extract the attributes for the file request $isFileRequest = false; @@ -132,14 +131,6 @@ class FilesDropPlugin extends ServerPlugin { throw new BadRequest('A nickname header is required for file requests'); } - // We're only allowing the upload of - // long path with subfolders if a nickname is set. - // This prevents confusion when uploading files and help - // classify them by uploaders. - if (!$nickname && !$isRootUpload) { - throw new BadRequest('A nickname header is required when uploading subfolders'); - } - if ($nickname) { try { $node->verifyPath($nickname);