Skip to content

Commit

Permalink
More status code tweaking and code comments
Browse files Browse the repository at this point in the history
  • Loading branch information
williamdes committed Dec 3, 2023
1 parent d06de98 commit 6124e41
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Resumable.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit 6124e41

Please sign in to comment.