Fix workflow engine mimetype detection when creating a directory

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2017-03-23 12:45:36 +01:00
parent 0b5e1814be
commit 394a61f1e6
No known key found for this signature in database
GPG Key ID: E166FD8976B3BAC8
1 changed files with 6 additions and 0 deletions

View File

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