Merge pull request #4010 from nextcloud/fac-58-mimetype-on-creating-directories
Fix workflow engine mimetype detection when creating a directory
This commit is contained in:
commit
35d3a082f2
|
@ -77,6 +77,12 @@ class FileMimeType extends AbstractStringCheck {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->isWebDAVRequest()) {
|
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') {
|
if ($this->request->getMethod() === 'PUT') {
|
||||||
$path = $this->request->getPathInfo();
|
$path = $this->request->getPathInfo();
|
||||||
$this->mimeType[$this->storage->getId()][$this->path] = $this->mimeTypeDetector->detectPath($path);
|
$this->mimeType[$this->storage->getId()][$this->path] = $this->mimeTypeDetector->detectPath($path);
|
||||||
|
|
Loading…
Reference in New Issue