Skip to content

Commit

Permalink
Merge pull request #33 from taichiroendo/validateFileOrder
Browse files Browse the repository at this point in the history
Change the chunk check order for speeding
  • Loading branch information
AidasK authored Jul 13, 2016
2 parents a1f471b + d17f496 commit b9da114
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Flow/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public function validateFile()
$totalChunks = $this->request->getTotalChunks();
$totalChunksSize = 0;

for ($i = 1; $i <= $totalChunks; $i++) {
for ($i = $totalChunks; $i >= 1; $i--) {
$file = $this->getChunkPath($i);
if (!file_exists($file)) {
return false;
Expand Down

0 comments on commit b9da114

Please sign in to comment.