Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Handle forward slash in attachments url change
  • Loading branch information
regalijan committed Mar 26, 2024
1 parent 2411714 commit 80be02d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion functions/api/reports/submit.ts
Expand Up @@ -203,7 +203,7 @@ export async function onRequestPost(context: RequestContext) {

for (const urlResult of uploadUrlResults as PromiseFulfilledResult<string>[]) {
uploadUrls.push(urlResult.value);
attachments.push(new URL(urlResult.value).pathname.replace(/^t\//, ""));
attachments.push(new URL(urlResult.value).pathname.replace(/^\/?t\//, ""));
}

await context.env.DATA.put(
Expand Down

0 comments on commit 80be02d

Please sign in to comment.