mirror of
https://github.com/transloadit/uppy.git
synced 2026-07-28 04:34:01 +00:00
Co-authored-by: Renée Kooi <renee@kooi.me>
This commit is contained in:
parent
6ea7a1bfe8
commit
91c7ea03ae
2 changed files with 8 additions and 1 deletions
|
|
@ -70,7 +70,8 @@ module.exports = class Tus extends Plugin {
|
|||
resume: true,
|
||||
useFastRemoteRetry: true,
|
||||
limit: 0,
|
||||
retryDelays: [0, 1000, 3000, 5000]
|
||||
retryDelays: [0, 1000, 3000, 5000],
|
||||
withCredentials: false
|
||||
}
|
||||
|
||||
// merge default options with the ones set by user
|
||||
|
|
@ -198,6 +199,11 @@ module.exports = class Tus extends Plugin {
|
|||
// the other in folder b.
|
||||
uploadOptions.fingerprint = getFingerprint(file)
|
||||
|
||||
uploadOptions.onBeforeRequest = (req) => {
|
||||
const xhr = req.getUnderlyingObject()
|
||||
xhr.withCredentials = !!opts.withCredentials
|
||||
}
|
||||
|
||||
uploadOptions.onError = (err) => {
|
||||
this.uppy.log(err)
|
||||
|
||||
|
|
|
|||
1
packages/@uppy/tus/types/index.d.ts
vendored
1
packages/@uppy/tus/types/index.d.ts
vendored
|
|
@ -18,6 +18,7 @@ declare module Tus {
|
|||
autoRetry?: boolean
|
||||
limit?: number
|
||||
useFastRemoteRetry?: boolean
|
||||
withCredentials?: boolean
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue