From 6124e41c1053c7d583cf52cd3d81a099f898c255 Mon Sep 17 00:00:00 2001 From: William Desportes Date: Sun, 3 Dec 2023 17:06:43 +0100 Subject: [PATCH] More status code tweaking and code comments --- src/Resumable.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Resumable.php b/src/Resumable.php index 3f89829..d01f13d 100644 --- a/src/Resumable.php +++ b/src/Resumable.php @@ -248,9 +248,11 @@ public function handleTestChunk() $chunkNumber = (int) $this->resumableParam($this->resumableOption['chunkNumber']); if (! $this->isChunkUploaded($identifier, $filename, $chunkNumber)) { - return $this->response->withStatus(200); + // We do not have the chunk, please send it + return $this->response->withStatus(204); } else { - return $this->response->withStatus(201); + // We have the chunk, do not send it + return $this->response->withStatus(200); } }