@@ -198,10 +198,9 @@ public function handleChunk(): ResponseInterface
198198 $ files = $ this ->request ->getUploadedFiles ();
199199 $ identifier = $ this ->resumableParam ($ this ->resumableOption ['identifier ' ]);
200200 $ filename = $ this ->resumableParam ($ this ->resumableOption ['filename ' ]);
201- $ totalChunks = (int ) $ this ->resumableParam ($ this ->resumableOption ['totalChunks ' ]);
202201 $ chunkNumber = (int ) $ this ->resumableParam ($ this ->resumableOption ['chunkNumber ' ]);
203202 $ chunkSize = (int ) $ this ->resumableParam ($ this ->resumableOption ['chunkSize ' ]);
204- $ totalSize = (int ) $ this ->resumableParam ($ this ->resumableOption ['totalSize ' ]);
203+ $ totalChunks = (int ) $ this ->resumableParam ($ this ->resumableOption ['totalChunks ' ]);
205204
206205 if ($ chunkSize <= 0 ) {
207206 $ this ->log ('The chunk size is <= 0 ' );
@@ -212,7 +211,7 @@ public function handleChunk(): ResponseInterface
212211 if (count ($ files ) > 0 ) {
213212 $ firstFile = array_shift ($ files );
214213 if ($ firstFile instanceof UploadedFileInterface) {
215- $ chunkDir = $ this ->tmpChunkDir ($ identifier ) . DIRECTORY_SEPARATOR ;
214+ $ chunkDir = $ this ->tmpChunkDir ($ identifier ) . DIRECTORY_SEPARATOR ;
216215 $ this ->chunkFile = $ chunkDir . $ this ->tmpChunkFilename ($ filename , $ chunkNumber );
217216 $ this ->log ('Moving chunk ' , ['identifier ' => $ identifier , 'chunkNumber ' => $ chunkNumber ]);
218217 // On the server that received the upload
@@ -316,10 +315,10 @@ public function resumableParams(): array
316315 return [];
317316 }
318317
319- public function isFileUploadComplete (string $ filename , string $ identifier , int $ numOfChunks ): bool
318+ public function isFileUploadComplete (string $ filename , string $ identifier , int $ totalChunks ): bool
320319 {
321- for ($ i = 1 ; $ i <= $ numOfChunks ; $ i ++) {
322- if (! $ this ->isChunkUploaded ($ identifier , $ filename , $ i )) {
320+ for ($ i = 1 ; $ i <= $ totalChunks ; $ i ++) {
321+ if (!$ this ->isChunkUploaded ($ identifier , $ filename , $ i )) {
323322 return false ;
324323 }
325324 }
0 commit comments