Fix attachment url generation
This commit is contained in:
parent
1ed905f4e1
commit
f86405438a
@ -1,5 +1,5 @@
|
||||
import { jsonError, jsonResponse } from "../../common.js";
|
||||
import upload from "../upload.js";
|
||||
import upload from "../../upload.js";
|
||||
|
||||
export async function onRequestPost(context: RequestContext) {
|
||||
const {
|
||||
@ -203,12 +203,7 @@ export async function onRequestPost(context: RequestContext) {
|
||||
|
||||
for (const urlResult of uploadUrlResults as PromiseFulfilledResult<string>[]) {
|
||||
uploadUrls.push(urlResult.value);
|
||||
|
||||
let url = (
|
||||
new URL(urlResult.value).searchParams.get("name") as string
|
||||
).replace(/^t\//, "");
|
||||
|
||||
attachments.push(url);
|
||||
attachments.push(urlResult.value.replace(/^t\//, ""));
|
||||
}
|
||||
|
||||
await context.env.DATA.put(
|
||||
|
Loading…
x
Reference in New Issue
Block a user