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

Large files result in 429 server error - too many requests #602

Open xongooli opened 2 years ago

xongooli commented 2 years ago

Large files result in a 429 server error - too many requests

This causes the upload to fail.

Should I increase the chunk size to reduce the number of requests and I so what is the best way to do it.

I'm using Resumable.js inside of Vue.js connected to a Laravel application..

alexandrelance commented 2 years ago

@xongooli Hello, you can increase a limit of requests per minute value on the server side.

For example, you can create a custom RateLimiter and configure it to the RouteServiceProvider configureRateLimiting() method.

RateLimiter::for('resumablejs-req', function (Request $request) {
            return Limit::perMinute(600)->by(optional($request->user())->id ?: $request->ip());
});