Skip to content

Commit

Permalink
Limit amount of concurrent tus requests (#8987)
Browse files Browse the repository at this point in the history
  • Loading branch information
JammingBen authored May 5, 2023
1 parent 9f96710 commit eb8ce91
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions changelog/unreleased/bugfix-limit-concurrent-tus-requests
Original file line number Diff line number Diff line change
@@ -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
4 changes: 4 additions & 0 deletions packages/web-runtime/src/services/uppyService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down

0 comments on commit eb8ce91

Please sign in to comment.