mirror of
https://github.com/System-End/cdn.git
synced 2026-04-19 16:18:17 +00:00
Update upload.ts
This commit is contained in:
parent
fc24df2e2b
commit
03d9656c0a
1 changed files with 1 additions and 1 deletions
|
|
@ -46,7 +46,7 @@ const upload = async (url: string, authorization: string | null) => {
|
|||
export default async (req: Request) => {
|
||||
if (!ensurePost(req)) return null;
|
||||
|
||||
const body =await req.arrayBuffer();
|
||||
const body = new TextDecoder().decode(await req.arrayBuffer());
|
||||
const uploadedFileUrl = await upload(body, req.headers.get("Authorization"));
|
||||
|
||||
return new Response(JSON.stringify(uploadedFileUrl));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue