feat : use cdn
This commit is contained in:
@@ -33,7 +33,7 @@ export async function POST(request: Request, context: RouteContext<"/api/commiss
|
||||
const bytes = new Uint8Array(await image.arrayBuffer());
|
||||
await inspectImage(bytes, image.type as "image/png" | "image/jpeg" | "image/webp");
|
||||
imageObjectKey = `commission/messages/${crypto.randomUUID()}`;
|
||||
await (await getMediaStorage()).write(imageObjectKey, bytes, { type: image.type, acl: "private" });
|
||||
await (await getMediaStorage()).write(imageObjectKey, bytes, { type: image.type, acl: "public-read" });
|
||||
}
|
||||
let messageId: string;
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user