When using Resumable.js, Flow.js, or simple-upload.js the last chunk can be bigger than the chunkSize parameter. Max twice as big but it is not defined in any of the mentioned libraries' documentation.
At the moment OneBasedRequestBodyRange component has the following check:
https://github.com/LaraCrafts/laravel-chunk-uploader/blob/029d3253c0fa3c11e313b338efaf033d80bdb14f/src/Range/OneBasedRequestBodyRange.php#L47
This makes it invalid without setting forceChunkSize.
A configuration should be introduced for forceChunkSize and the mentioned validation should compare totalSize with (numberOfChunks + 1) * chunkSize.
For now I will add a note in the README to use forceChunkSize option when using the above mentioned libraries.
When using
Resumable.js,Flow.js, orsimple-upload.jsthe last chunk can be bigger than thechunkSizeparameter. Max twice as big but it is not defined in any of the mentioned libraries' documentation.At the moment
OneBasedRequestBodyRangecomponent has the following check:https://github.com/LaraCrafts/laravel-chunk-uploader/blob/029d3253c0fa3c11e313b338efaf033d80bdb14f/src/Range/OneBasedRequestBodyRange.php#L47
This makes it invalid without setting
forceChunkSize.A configuration should be introduced for
forceChunkSizeand the mentioned validation should comparetotalSizewith(numberOfChunks + 1) * chunkSize.For now I will add a note in the README to use
forceChunkSizeoption when using the above mentioned libraries.