This commit is contained in:
CutestNekoAqua 2023-02-23 17:20:34 +01:00
parent ac6cc1ea45
commit 066b4fa78d

View File

@ -82,7 +82,7 @@ mastoFileRouter.post("/v1/media", upload.single("file"), async (ctx) => {
ctx.status = 401;
return;
}
const data = await client.uploadMedia(multipartData.buffer);
const data = await client.uploadMedia(multipartData);
ctx.body = data.data;
} catch (e: any) {
console.error(e);
@ -101,7 +101,7 @@ mastoFileRouter.post("/v2/media", upload.single("file"), async (ctx) => {
ctx.status = 401;
return;
}
const data = await client.uploadMedia(multipartData.buffer);
const data = await client.uploadMedia(multipartData);
ctx.body = data.data;
} catch (e: any) {
console.error(e);