Skip to content

Commit cc8f704

Browse files
author
Christoph Fiehe
committedOct 27, 2023
This commit fixes the problem with missing metadata for chunked uploads. Signed-off-by: Christoph Fiehe <c.fiehe@eurodata.de>
1 parent 60e0322 commit cc8f704

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎apps/dav/lib/Upload/ChunkingV2Plugin.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ public function afterMkcol(RequestInterface $request, ResponseInterface $respons
144144

145145
public function beforePut(RequestInterface $request, ResponseInterface $response): bool {
146146
try {
147-
$this->prepareUpload(dirname($request->getPath()));
147+
$this->prepareUpload(basename(dirname($request->getPath())));
148148
$this->checkPrerequisites();
149149
} catch (StorageInvalidException|BadRequest|NotFound $e) {
150150
return true;
@@ -189,7 +189,7 @@ public function beforePut(RequestInterface $request, ResponseInterface $response
189189

190190
public function beforeMove($sourcePath, $destination): bool {
191191
try {
192-
$this->prepareUpload(dirname($sourcePath));
192+
$this->prepareUpload(basename(dirname($sourcePath)));
193193
$this->checkPrerequisites();
194194
} catch (StorageInvalidException|BadRequest|NotFound|PreconditionFailed $e) {
195195
return true;
@@ -255,7 +255,7 @@ public function beforeMove($sourcePath, $destination): bool {
255255

256256
public function beforeDelete(RequestInterface $request, ResponseInterface $response) {
257257
try {
258-
$this->prepareUpload(dirname($request->getPath()));
258+
$this->prepareUpload(basename(dirname($request->getPath())));
259259
$this->checkPrerequisites();
260260
} catch (StorageInvalidException|BadRequest|NotFound $e) {
261261
return true;

0 commit comments

Comments
 (0)
Please sign in to comment.