瀏覽代碼

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

Renée Kooi 5 年之前
父節點
當前提交
3c1a2afb09
共有 1 個文件被更改,包括 2 次插入1 次删除
  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()
       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(
       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',
         '[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'
         'warning'