Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Don't use the full url for attachment property
  • Loading branch information
regalijan committed Mar 26, 2024
1 parent f864054 commit 30b3845
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(urlResult.value.replace(/^t\//, ""));
attachments.push(new URL(urlResult.value).pathname.replace(/^t\//, ""));
}

await context.env.DATA.put(
Expand Down

0 comments on commit 30b3845

Please sign in to comment.