-
-
Notifications
You must be signed in to change notification settings - Fork 319
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: support concurrency limit #542
base: master
Are you sure you want to change the base?
Conversation
When enabling multi-file upload, you can control the concurrency by providing the `concurrencyLimit` property. The `concurrencyLimit` property creates a `ConcurrencyRequester` instance, storing all requests in the instance's queue. The concurrent upload task quantity is restricted by the `concurrencyLimit` when using the `send` method of the instance at the end of the `uploadFiles` process.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #542 +/- ##
===========================================
- Coverage 87.21% 75.07% -12.15%
===========================================
Files 6 7 +1
Lines 266 325 +59
Branches 72 79 +7
===========================================
+ Hits 232 244 +12
- Misses 34 81 +47 ☔ View full report in Codecov by Sentry. |
- Use type imports in concurrencyRequest.ts for better clarity. - Extract XHR load event handling into a separate function, onXHRLoad, in request.ts. - Update references to onXHRLoad in both concurrencyRequest.ts and request.ts.
覆盖率得想办法补一下。 |
试过了,并发请求的测试实再不知道怎么写 |
@zombieJ 这个的用例来帮忙补一下? |
This could be a useful feature to control browser resource usage with batch file uploads. Any chance this would be merged? |
When enabling multi-file upload, you can control the concurrency by providing the
concurrencyLimit
property.The
concurrencyLimit
property creates aConcurrencyRequester
instance, storing all requests in the instance's queue. The concurrent upload task quantity is restricted by theconcurrencyLimit
when using thesend
method of the instance at the end of theuploadFiles
process.