Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
Store new dav chunks directly, no hooks
Store new dav chunks directly instead of going through File::put() which
would run all hooks. Hooks are now only triggered at the end of the
transfer when the future file is moved to the final file, in which case
the assemble data goes through File::put() and triggers the hooks.
  • Loading branch information
Vincent Petry committed Aug 28, 2017
commit 1b2b066fdd41679a047021ecf33747af946bedfc
4 changes: 4 additions & 0 deletions apps/dav/lib/Connector/Sabre/Node.php
Original file line number Diff line number Diff line change
Expand Up @@ -383,4 +383,8 @@ protected function sanitizeMtime ($mtimeFromRequest) {
return $mtime;
}

public function getView() {
return $this->fileView;
}

}
4 changes: 2 additions & 2 deletions apps/dav/lib/Upload/UploadFolder.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ function __construct(Directory $node) {
}

function createFile($name, $data = null) {
// TODO: verify name - should be a simple number
$this->node->createFile($name, $data);
$view = $this->node->getView();
$view->file_put_contents($this->node->getPath() . '/' . $name, $data);
}

function createDirectory($name) {
Expand Down