Skip to content

Commit 42d558c

Browse files
committed
Fix upload-offset (single part uploads)
Fix the upload-offset header when a single part upload returns checksum mismatch.
1 parent 41f254c commit 42d558c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Server.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ protected function handlePATCH(): ResponseInterface
343343
$localChecksum = base64_encode(hash_final($hashContext, true));
344344
if ($localChecksum !== $checksum->value) {
345345
return $this->response->withStatus(460, "Checksum Mismatch")
346-
->withHeader("Upload-Offset", $fsize);
346+
->withHeader("Upload-Offset", $singlePartUpload ? 0 : $fsize);
347347
}
348348
rewind($this->stream);
349349

0 commit comments

Comments
 (0)