From 03d9656c0a09f59efa10c478bb2569758f01e5fd Mon Sep 17 00:00:00 2001 From: Caleb Denio Date: Sun, 5 May 2024 17:30:59 -0400 Subject: [PATCH] Update upload.ts --- api/v2/upload.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/v2/upload.ts b/api/v2/upload.ts index cc00547..263f047 100644 --- a/api/v2/upload.ts +++ b/api/v2/upload.ts @@ -46,7 +46,7 @@ const upload = async (url: string, authorization: string | null) => { export default async (req: Request) => { if (!ensurePost(req)) return null; - const body =await req.arrayBuffer(); + const body = new TextDecoder().decode(await req.arrayBuffer()); const uploadedFileUrl = await upload(body, req.headers.get("Authorization")); return new Response(JSON.stringify(uploadedFileUrl));