parse full multipart data to media endpoints

This commit is contained in:
cutestnekoaqua 2023-03-01 15:53:40 +01:00
parent c74f4942d3
commit 980d447561
No known key found for this signature in database
GPG Key ID: 6BF0964A5069C1E0
1 changed files with 2 additions and 2 deletions

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);