Browse Source

xhr-upload: do not emit limit warning if an existing rate limit queue was passed

Renée Kooi 5 years ago
parent
commit
3c1a2afb09
1 changed files with 2 additions and 1 deletions
  1. 2 1
      packages/@uppy/xhr-upload/src/index.js

+ 2 - 1
packages/@uppy/xhr-upload/src/index.js

@@ -581,7 +581,8 @@ module.exports = class XHRUpload extends Plugin {
       return Promise.resolve()
     }
 
-    if (this.opts.limit === 0) {
+    // no limit configured by the user, and no RateLimitedQueue passed in by a "parent" plugin (basically just AwsS3) using the top secret `__queue` option
+    if (this.opts.limit === 0 && !this.opts.__queue) {
       this.uppy.log(
         '[XHRUpload] When uploading multiple files at once, consider setting the `limit` option (to `10` for example), to limit the number of concurrent uploads, which helps prevent memory and network issues: https://uppy.io/docs/xhr-upload/#limit-0',
         'warning'