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);