summaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/Connector/Sabre/FilesPlugin.php
diff options
context:
space:
mode:
authorJoas Schilling <213943+nickvergessen@users.noreply.github.com>2023-02-21 07:36:43 +0100
committerGitHub <noreply@github.com>2023-02-21 07:36:43 +0100
commit98ed72b3ed7e81a75d9a323c70a5e7f5af265a23 (patch)
treea92d3ab78f2fa52969139448a8aa7c509ed97af5 /apps/dav/lib/Connector/Sabre/FilesPlugin.php
parent93e703bbfc7c8ef654b7b0185474397ec1bbaa6b (diff)
downloadnextcloud-server-98ed72b3ed7e81a75d9a323c70a5e7f5af265a23.tar.gz
nextcloud-server-98ed72b3ed7e81a75d9a323c70a5e7f5af265a23.zip
Revert "fix(performance): Do not set up filesystem on every call"
Diffstat (limited to 'apps/dav/lib/Connector/Sabre/FilesPlugin.php')
-rw-r--r--apps/dav/lib/Connector/Sabre/FilesPlugin.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/apps/dav/lib/Connector/Sabre/FilesPlugin.php b/apps/dav/lib/Connector/Sabre/FilesPlugin.php
index 4a5c071848c..a6c9b8b4ebe 100644
--- a/apps/dav/lib/Connector/Sabre/FilesPlugin.php
+++ b/apps/dav/lib/Connector/Sabre/FilesPlugin.php
@@ -577,6 +577,15 @@ class FilesPlugin extends ServerPlugin {
* @throws \Sabre\DAV\Exception\BadRequest
*/
public function sendFileIdHeader($filePath, \Sabre\DAV\INode $node = null) {
+ // chunked upload handling
+ if (isset($_SERVER['HTTP_OC_CHUNKED'])) {
+ [$path, $name] = \Sabre\Uri\split($filePath);
+ $info = \OC_FileChunking::decodeName($name);
+ if (!empty($info)) {
+ $filePath = $path . '/' . $info['name'];
+ }
+ }
+
// we get the node for the given $filePath here because in case of afterCreateFile $node is the parent folder
if (!$this->server->tree->nodeExists($filePath)) {
return;