From 5d7695720f797d0903433616db14c9d0a601eb29 Mon Sep 17 00:00:00 2001 From: regalijan Date: Thu, 19 Oct 2023 16:51:08 -0400 Subject: [PATCH] Actually fix attachment url issue --- functions/api/reports/submit.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/functions/api/reports/submit.ts b/functions/api/reports/submit.ts index eed12b3..0692a8d 100644 --- a/functions/api/reports/submit.ts +++ b/functions/api/reports/submit.ts @@ -188,7 +188,9 @@ export async function onRequestPost(context: RequestContext) { for (const urlResult of uploadUrlResults as PromiseFulfilledResult[]) { uploadUrls.push(urlResult.value); - let url = new URL(urlResult.value).searchParams.get("name") as string; + let url = ( + new URL(urlResult.value).searchParams.get("name") as string + ).replace(/^t\//, ""); attachments.push(url); }