Fixed file upload types
This commit is contained in:
parent
7cd717fc7d
commit
0985ff145e
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ztimson/utils",
|
||||
"version": "0.8.1",
|
||||
"version": "0.8.2",
|
||||
"description": "Utility library",
|
||||
"author": "Zak Timson",
|
||||
"license": "MIT",
|
||||
|
@ -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<UploadEvents>();
|
||||
const formData = new FormData();
|
||||
|
Loading…
Reference in New Issue
Block a user