From d17f496fb63aa06c9285464efac5458b26fab449 Mon Sep 17 00:00:00 2001 From: Taichiro Endo Date: Wed, 13 Jul 2016 13:16:03 +0900 Subject: [PATCH] Change the chunk check order for speeding --- src/Flow/File.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Flow/File.php b/src/Flow/File.php index 71efeaa..60fb3a1 100644 --- a/src/Flow/File.php +++ b/src/Flow/File.php @@ -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;