From 0dd72358da6864ee1b0960ee9487ea7861d63382 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sun, 17 Mar 2024 13:33:37 -0400 Subject: [PATCH] feat: add onUploadProgress to CustomUploadOptions --- src/methods/upload.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/methods/upload.ts b/src/methods/upload.ts index 97f1305..509d528 100644 --- a/src/methods/upload.ts +++ b/src/methods/upload.ts @@ -1,4 +1,4 @@ -import { AxiosResponse } from "axios"; +import { AxiosProgressEvent } from "axios"; import { DetailedError, HttpRequest, Upload } from "tus-js-client"; import { blake3 } from "@noble/hashes/blake3"; @@ -51,6 +51,7 @@ export type CustomUploadOptions = BaseCustomOptions & { // Large files. largeFileSize?: number; retryDelays?: number[]; + onUploadProgress?: (progressEvent: AxiosProgressEvent) => void; }; export const DEFAULT_UPLOAD_OPTIONS = {