Skip to content

Commit d17f496

Browse files
committed
Change the chunk check order for speeding
1 parent a1f471b commit d17f496

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Flow/File.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public function validateFile()
121121
$totalChunks = $this->request->getTotalChunks();
122122
$totalChunksSize = 0;
123123

124-
for ($i = 1; $i <= $totalChunks; $i++) {
124+
for ($i = $totalChunks; $i >= 1; $i--) {
125125
$file = $this->getChunkPath($i);
126126
if (!file_exists($file)) {
127127
return false;

0 commit comments

Comments
 (0)