]> source.dussan.org Git - nextcloud-server.git/commitdiff
feat(files_sharing): allow uploading to subfolders in File requests
authorskjnldsv <skjnldsv@protonmail.com>
Tue, 16 Jul 2024 19:25:34 +0000 (21:25 +0200)
committerskjnldsv <skjnldsv@protonmail.com>
Thu, 18 Jul 2024 17:47:11 +0000 (19:47 +0200)
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
apps/dav/lib/Files/Sharing/FilesDropPlugin.php

index 2f4bacf69d4b7261999975166627a6530140e73f..c4d1957c67e4c7acde95d7d888e2a8648c9c069b 100644 (file)
@@ -22,10 +22,7 @@ class FilesDropPlugin extends ServerPlugin {
        /** @var bool */
        private $enabled = false;
 
-       /**
-        * @param View $view
-        */
-       public function setView($view) {
+       public function setView(View $view) {
                $this->view = $view;
        }
 
@@ -52,7 +49,7 @@ class FilesDropPlugin extends ServerPlugin {
                        return;
                }
 
-               if ($request->getMethod() !== 'PUT') {
+               if ($request->getMethod() !== 'PUT' && $request->getMethod() !== 'MKCOL') {
                        throw new MethodNotAllowed('Only PUT is allowed on files drop');
                }