Remove leading slash for no processing required videos

This commit is contained in:
Regalijan 2024-03-25 23:45:40 -04:00
parent 237765a89e
commit 0edbe2acec
Signed by: regalijan
GPG Key ID: 5D4196DA269EF520

View File

@ -206,7 +206,7 @@ export async function onRequestPost(context: RequestContext) {
for (const urlResult of uploadUrlResults as PromiseFulfilledResult<string>[]) { for (const urlResult of uploadUrlResults as PromiseFulfilledResult<string>[]) {
uploadUrls.push(urlResult.value); 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( await context.env.DATA.put(