Skip to content
Prev Previous commit
Next Next commit
fix(FilesDropPlugin): Allow MKCOL for file drop to upload folders
Signed-off-by: provokateurin <kate@provokateurin.de>
  • Loading branch information
provokateurin committed Nov 18, 2025
commit b5ad0aad3a8c506735e3d870201743cc530f6594
9 changes: 0 additions & 9 deletions apps/dav/lib/Files/Sharing/FilesDropPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ public function beforeMethod(RequestInterface $request, ResponseInterface $respo
$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;
Expand All @@ -132,14 +131,6 @@ public function beforeMethod(RequestInterface $request, ResponseInterface $respo
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);
Expand Down