diff --git a/changelog/unreleased/bugfix-limit-concurrent-tus-requests b/changelog/unreleased/bugfix-limit-concurrent-tus-requests new file mode 100644 index 00000000000..bce88eebb66 --- /dev/null +++ b/changelog/unreleased/bugfix-limit-concurrent-tus-requests @@ -0,0 +1,6 @@ +Bugfix: Limit amount of concurrent tus requests + +The amount of concurrent tus requests when uploading has been reduced to 5. This fixes an issue where the access token renewal failed during an ongoing upload because of the sheer amount of pending requests. + +https://github.com/owncloud/web/pull/8987 +https://github.com/owncloud/web/issues/8977 diff --git a/packages/web-runtime/src/services/uppyService.ts b/packages/web-runtime/src/services/uppyService.ts index cb1fdcc19ef..6876a5c68b4 100644 --- a/packages/web-runtime/src/services/uppyService.ts +++ b/packages/web-runtime/src/services/uppyService.ts @@ -59,12 +59,16 @@ export class UppyService { overridePatchMethod: !!tusHttpMethodOverride, retryDelays: [0, 500, 1000], uploadDataDuringCreation, + limit: 5, onBeforeRequest, onShouldRetry: (err, retryAttempt, options, next) => { // status code 5xx means the upload is gone on the server side if (err?.originalResponse?.getStatus() >= 500) { return false } + if (err?.originalResponse?.getStatus() === 401) { + return true + } return next(err) } }