|
@@ -70,7 +70,8 @@ module.exports = class Tus extends Plugin {
|
|
resume: true,
|
|
resume: true,
|
|
useFastRemoteRetry: true,
|
|
useFastRemoteRetry: true,
|
|
limit: 0,
|
|
limit: 0,
|
|
- retryDelays: [0, 1000, 3000, 5000]
|
|
|
|
|
|
+ retryDelays: [0, 1000, 3000, 5000],
|
|
|
|
+ withCredentials: false
|
|
}
|
|
}
|
|
|
|
|
|
// merge default options with the ones set by user
|
|
// merge default options with the ones set by user
|
|
@@ -198,6 +199,11 @@ module.exports = class Tus extends Plugin {
|
|
// the other in folder b.
|
|
// the other in folder b.
|
|
uploadOptions.fingerprint = getFingerprint(file)
|
|
uploadOptions.fingerprint = getFingerprint(file)
|
|
|
|
|
|
|
|
+ uploadOptions.onBeforeRequest = (req) => {
|
|
|
|
+ const xhr = req.getUnderlyingObject()
|
|
|
|
+ xhr.withCredentials = !!opts.withCredentials
|
|
|
|
+ }
|
|
|
|
+
|
|
uploadOptions.onError = (err) => {
|
|
uploadOptions.onError = (err) => {
|
|
this.uppy.log(err)
|
|
this.uppy.log(err)
|
|
|
|
|