From 14155e5a928410ce4b62c2af11cf06abffa5d51d Mon Sep 17 00:00:00 2001 From: Shourav Nath Date: Thu, 12 Sep 2024 01:08:55 +0600 Subject: [PATCH] Fix: Fixed double file extension in zip --- src/app/api/archive/route.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/api/archive/route.ts b/src/app/api/archive/route.ts index 27c0f9a..44ff8de 100644 --- a/src/app/api/archive/route.ts +++ b/src/app/api/archive/route.ts @@ -14,7 +14,7 @@ export async function GET(request: Request) { const downloads = await Promise.all(urls?.map(async ({ url, name, format }: ArchiveDownload) => { return { data: await fetch(url).then(r => r.arrayBuffer()), - name: `${name}.${format}` + name: `${name.split('.')[0]}.${format}` } }));