Last chunk can be twice as big as the chunk size #44
Labels
bug
Something isn't working
good first issue
Good for newcomers
help wanted
Extra attention is needed
Milestone
When using
Resumable.js
,Flow.js
, orsimple-upload.js
the last chunk can be bigger than thechunkSize
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 comparetotalSize
with(numberOfChunks + 1) * chunkSize
.For now I will add a note in the README to use
forceChunkSize
option when using the above mentioned libraries.The text was updated successfully, but these errors were encountered: