Skip to content

Last chunk can be twice as big as the chunk size #44

Open
@nerg4l

Description

@nerg4l

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomershelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions