Skip to content

Commit

Permalink
fix: add defalut contentType as multipart/form-data in sendFile
Browse files Browse the repository at this point in the history
  • Loading branch information
vishalnarkhede committed Nov 29, 2023
1 parent 18702c5 commit 163aa97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1034,7 +1034,7 @@ export class StreamChat<StreamChatGenerics extends ExtendableGenerics = DefaultG
contentType?: string,
user?: UserResponse<StreamChatGenerics>,
) {
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<SendFileAPIResponse>('postForm', url, data, {
Expand Down

0 comments on commit 163aa97

Please sign in to comment.