Fixed upload export
This commit is contained in:
parent
2fe8cdb96a
commit
7cd717fc7d
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@ztimson/utils",
|
"name": "@ztimson/utils",
|
||||||
"version": "0.8.0",
|
"version": "0.8.1",
|
||||||
"description": "Utility library",
|
"description": "Utility library",
|
||||||
"author": "Zak Timson",
|
"author": "Zak Timson",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
@ -6,7 +6,7 @@ export type UploadEvents = TypedEvents & {
|
|||||||
progress: (progress: number) => any;
|
progress: (progress: number) => any;
|
||||||
}
|
}
|
||||||
|
|
||||||
function uploadProgress(files : File | FileList, url: string) {
|
export function uploadProgress(files : File | FileList, url: string) {
|
||||||
const xhr = new XMLHttpRequest();
|
const xhr = new XMLHttpRequest();
|
||||||
const progress = new TypedEmitter<UploadEvents>();
|
const progress = new TypedEmitter<UploadEvents>();
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
|
Loading…
Reference in New Issue
Block a user