From 0985ff145efe1ce1c0825487fe9dca98dfa780c5 Mon Sep 17 00:00:00 2001 From: ztimson Date: Wed, 24 Apr 2024 07:06:17 -0400 Subject: [PATCH] Fixed file upload types --- package.json | 2 +- src/upload.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 44a11a7..2dda74a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ztimson/utils", - "version": "0.8.1", + "version": "0.8.2", "description": "Utility library", "author": "Zak Timson", "license": "MIT", diff --git a/src/upload.ts b/src/upload.ts index 1ebff25..30dbc40 100644 --- a/src/upload.ts +++ b/src/upload.ts @@ -6,7 +6,7 @@ export type UploadEvents = TypedEvents & { progress: (progress: number) => any; } -export function uploadProgress(files : File | FileList, url: string) { +export function uploadProgress(files : File | File[], url: string) { const xhr = new XMLHttpRequest(); const progress = new TypedEmitter(); const formData = new FormData();