Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
A folder should get a folder mimetype
If doing achunked upload the mimetype of the folder would otherwise be
guessed from the path. Which always returned application/octet-stream.

If an access control rule to block that is in place this means that all
chunked uploads fail hard in directories as the isCreatable on the
directory always fails.

Signed-off-by: Roeland Jago Douma <[email protected]>
  • Loading branch information
rullzer committed Nov 6, 2018
commit fc49fa16208661c8890e45b0441ec5daf7ca2d48
5 changes: 5 additions & 0 deletions apps/workflowengine/lib/Check/FileMimeType.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@ protected function getActualValue() {
return $this->mimeType[$this->storage->getId()][$this->path];
}

if ($this->storage->is_dir($this->path)) {
$this->mimeType[$this->storage->getId()][$this->path] = 'httpd/unix-directory';
return $this->mimeType[$this->storage->getId()][$this->path];
}

if ($this->isWebDAVRequest()) {
// Creating a folder
if ($this->request->getMethod() === 'MKCOL') {
Expand Down