diff --git a/functions/api/reports/submit.ts b/functions/api/reports/submit.ts index c76be06..5ce69f5 100644 --- a/functions/api/reports/submit.ts +++ b/functions/api/reports/submit.ts @@ -165,7 +165,7 @@ export async function onRequestPost(context: RequestContext) { context.env, ["mp4", "m4v", "webm"].includes(fileExten) ? fileUploadKey - : `t/${fileUploadKey}.${fileExten}`, + : `t/${fileUploadKey}`, file.size, fileExten, ), @@ -208,11 +208,7 @@ export async function onRequestPost(context: RequestContext) { for (const urlResult of uploadUrlResults as PromiseFulfilledResult[]) { uploadUrls.push(urlResult.value); - attachments.push( - new URL(urlResult.value).pathname - .replace(/^\/?t?\//, "") - .replace(/\.\w*$/, ""), - ); + attachments.push(new URL(urlResult.value).pathname.replace(/^\/?t?\//, "")); } await context.env.DATA.put(