From 3c1a2afb09576f75e91a19604aa64235710d9238 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9e=20Kooi?= Date: Mon, 6 Jan 2020 13:24:08 +0100 Subject: [PATCH] xhr-upload: do not emit limit warning if an existing rate limit queue was passed --- packages/@uppy/xhr-upload/src/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/@uppy/xhr-upload/src/index.js b/packages/@uppy/xhr-upload/src/index.js index 5fac74d88b..a46ce02ea2 100644 --- a/packages/@uppy/xhr-upload/src/index.js +++ b/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'