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