Skip to content

Commit

Permalink
@uppy/tus: fix onBeforeRequest type (#5566)
Browse files Browse the repository at this point in the history
fix(types): tus.onBeforeRequest handler may return a promise
  • Loading branch information
dschmidt authored Jan 6, 2025
1 parent ddd2be5 commit 982663a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/@uppy/tus/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ export interface TusOpts<M extends Meta, B extends Body>
| ((file: UppyFile<M, B>) => Record<string, string>)
limit?: number
chunkSize?: number
onBeforeRequest?: (req: tus.HttpRequest, file: UppyFile<M, B>) => void
onBeforeRequest?: (
req: tus.HttpRequest,
file: UppyFile<M, B>,
) => void | Promise<void>
onShouldRetry?: (
err: tus.DetailedError,
retryAttempt: number,
Expand Down

0 comments on commit 982663a

Please sign in to comment.