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.67k stars 611 forks source link

Feature request: Adapt chunk size automatically according to the network speed #477

Open SuperPat45 opened 6 years ago

SuperPat45 commented 6 years ago

Hi,

Ideally, chunk size should automatically adjust according to the network speed.

Because if I connect to the local network or from a smartphone with a bad connection the flow will not be the same at all and has a great chance of failing with it (hence the need for smaller chunk size).

For that, we could, for example, replace the chunkSize parameter by minChunkSize and and a maxChunkSize which will have to be a multiple of the previous one