diff --git a/packages/pl-api/lib/client/media.ts b/packages/pl-api/lib/client/media.ts index 9f57089ab..0fdc03518 100644 --- a/packages/pl-api/lib/client/media.ts +++ b/packages/pl-api/lib/client/media.ts @@ -16,7 +16,7 @@ const media = (client: PlApiBaseClient) => ({ uploadMedia: async (params: UploadMediaParams, meta?: RequestMeta) => { const response = await client.request( client.features.mediaV2 ? '/api/v2/media' : '/api/v1/media', - { ...meta, method: 'POST', body: params, contentType: '' }, + { ...meta, method: 'POST', body: params, formData: true }, ); return v.parse(mediaAttachmentSchema, response.json); diff --git a/packages/pl-api/lib/client/oauth.ts b/packages/pl-api/lib/client/oauth.ts index 568ffee02..a2e051a90 100644 --- a/packages/pl-api/lib/client/oauth.ts +++ b/packages/pl-api/lib/client/oauth.ts @@ -19,7 +19,7 @@ const oauth = (client: PlApiBaseClient) => ({ * @see {@link https://docs.joinmastodon.org/methods/oauth/#authorize} */ authorize: async (params: OauthAuthorizeParams) => { - const response = await client.request('/oauth/authorize', { params, contentType: '' }); + const response = await client.request('/oauth/authorize', { params, formData: true }); return v.parse(v.string(), response.json); },