diff options
| author | Adam Soltys <[email protected]> | 2024-10-31 09:34:16 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-10-31 09:34:16 -0700 |
| commit | 243abb0a3d29e8e34e263eec843488e3bdb468a4 (patch) | |
| tree | be55931ba0f3c110c3001f56a5339cb63e78b761 /src/lib/upload.ts | |
| parent | 4742e72ec25823ceeea7848fb2e1f868bed7f472 (diff) | |
| download | coinos-ui-243abb0a3d29e8e34e263eec843488e3bdb468a4.tar.gz coinos-ui-243abb0a3d29e8e34e263eec843488e3bdb468a4.zip | |
biome
Diffstat (limited to 'src/lib/upload.ts')
| -rw-r--r-- | src/lib/upload.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/upload.ts b/src/lib/upload.ts index 6bc5eaf3..6d9d4230 100644 --- a/src/lib/upload.ts +++ b/src/lib/upload.ts @@ -1,10 +1,10 @@ export const upload = async (file, type, progress) => { - let url = `/api/upload/${type}`; - let formData = new FormData(); + const url = `/api/upload/${type}`; + const formData = new FormData(); formData.append("file", file); return new Promise((resolve, reject) => { - let ajax = new XMLHttpRequest(); + const ajax = new XMLHttpRequest(); ajax.addEventListener("load", () => { if (ajax.readyState === ajax.DONE) { if (ajax.status === 200) resolve(ajax.response); |
