You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/api.md
+8-2Lines changed: 8 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -94,18 +94,24 @@ onShouldRetry: function (err, retryAttempt, options) {
94
94
console.log("Error", err)
95
95
console.log("Request", err.originalRequest)
96
96
console.log("Response", err.originalResponse)
97
-
97
+
98
98
var status =err.originalResponse?err.originalResponse.getStatus() :0
99
99
// Do not retry if the status is a 403.
100
100
if (status ===403) {
101
101
returnfalse
102
102
}
103
-
103
+
104
104
// For any other status code, we retry.
105
105
returntrue
106
106
}
107
107
```
108
108
109
+
#### onUploadUrlAvailable
110
+
111
+
*Default value:*`null`
112
+
113
+
An optional function called once the upload URL is available. At this point, the `tus.Upload#url` property is guaranteed to be accessible and valid. This occurs after inspecting the `Location` header in the response to the initial POST request, or when an upload URL is confirmed using a HEAD request. Due to network errors and retries, this callback might be invoked multiple times for a single upload.
0 commit comments