From 64e2a2aeba1176be1eb8816f654fcf78c1c07066 Mon Sep 17 00:00:00 2001 From: Vishal Narkhede Date: Wed, 29 Nov 2023 14:31:10 +0100 Subject: [PATCH] fix: add default contentType as multipart/form-data in sendFile (#1202) --- src/client.ts | 2 +- src/types.ts | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/client.ts b/src/client.ts index 178626329..974d11cb5 100644 --- a/src/client.ts +++ b/src/client.ts @@ -1034,7 +1034,7 @@ export class StreamChat, ) { - const data = addFileToFormData(uri, name, contentType); + const data = addFileToFormData(uri, name, contentType || 'multipart/form-data'); if (user != null) data.append('user', JSON.stringify(user)); return this.doAxiosRequest('postForm', url, data, { diff --git a/src/types.ts b/src/types.ts index 00065c5f9..12b855428 100644 --- a/src/types.ts +++ b/src/types.ts @@ -319,8 +319,10 @@ export type ChannelMemberResponse; user_id?: string; @@ -1745,8 +1747,10 @@ export type ChannelMembership; }; @@ -2043,6 +2047,8 @@ type GiphyVersionInfo = { height: string; url: string; width: string; + frames?: string; + size?: string; }; type GiphyVersions =