mirror of
https://github.com/nextcloud/server.git
synced 2026-04-02 15:45:38 -04:00
fix(FilesDropPlugin): Allow MKCOL for file drop to upload folders
Signed-off-by: provokateurin <kate@provokateurin.de>
This commit is contained in:
parent
d332ab60d3
commit
ff1772f4bc
1 changed files with 0 additions and 9 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue