From d99dfa9718ede8ee9b8d1654467b1974f93c511e Mon Sep 17 00:00:00 2001 From: Sam Poder <39828164+sampoder@users.noreply.github.com> Date: Sat, 25 Feb 2023 09:55:36 +0800 Subject: [PATCH] Update new.ts --- api/v1/new.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/v1/new.ts b/api/v1/new.ts index bb4c1a4..a54c9e4 100644 --- a/api/v1/new.ts +++ b/api/v1/new.ts @@ -82,7 +82,7 @@ export default async (req: Request) => { const buf = await req.arrayBuffer(); console.log(decoder.decode(buf)) console.log(buf) - const fileURLs = JSON.parse(decoder.decode(buf)); + const fileURLs = decoder.decode(buf); if (!Array.isArray(fileURLs) || fileURLs.length < 1) { return new Response( JSON.stringify({ error: "Empty file array" }),