23 / resumable.js

A JavaScript library for providing multiple simultaneous, stable, fault-tolerant and resumable/restartable uploads via the HTML5 File API.
MIT License
4.66k stars 611 forks source link

Java example seems to be finishing before the last chunk #538

Closed elielwaltrick closed 5 years ago

elielwaltrick commented 5 years ago

This is the request I'm using to test the java example

http://localhost:9000/upload? resumableChunkNumber=4& resumableChunkSize=100& resumableCurrentChunkSize=100& resumableTotalSize=500& resumableIdentifier=123test& resumableFilename=asd.txt& resumableRelativePath=asd.txt& resumableTotalChunks=5

But it says "All finished" when it gets to chunk number 4, instead of waiting for chunk number 5.

My guess is the bug is in the ResumableInfo.java class, in the checkIfUploadFinished method.

where it says

for(int i = 1; i < count; i ++) {

shouldn't it be instead

for(int i = 1; i <= count; i ++) {

?

Or am I doing something wrong?