From 394a61f1e62d143addcec44ce9479994f8fbc587 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 23 Mar 2017 12:45:36 +0100 Subject: [PATCH] Fix workflow engine mimetype detection when creating a directory Signed-off-by: Joas Schilling --- apps/workflowengine/lib/Check/FileMimeType.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/workflowengine/lib/Check/FileMimeType.php b/apps/workflowengine/lib/Check/FileMimeType.php index 8608fffd4e2..fe4a83bb906 100644 --- a/apps/workflowengine/lib/Check/FileMimeType.php +++ b/apps/workflowengine/lib/Check/FileMimeType.php @@ -77,6 +77,12 @@ class FileMimeType extends AbstractStringCheck { } if ($this->isWebDAVRequest()) { + // Creating a folder + if ($this->request->getMethod() === 'MKCOL') { + $this->mimeType[$this->storage->getId()][$this->path] = 'httpd/unix-directory'; + return $this->mimeType[$this->storage->getId()][$this->path]; + } + if ($this->request->getMethod() === 'PUT') { $path = $this->request->getPathInfo(); $this->mimeType[$this->storage->getId()][$this->path] = $this->mimeTypeDetector->detectPath($path); -- 2.39.5