Don't use the full url for attachment property

This commit is contained in:
Regalijan 2024-03-25 21:30:19 -04:00
parent f86405438a
commit 30b384546d
Signed by: regalijan
GPG Key ID: 5D4196DA269EF520

View File

@ -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(