diff options
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); |
