From d8f642372eb0a7fa57c9b386308547a1a2b38a56 Mon Sep 17 00:00:00 2001 From: Jindra Date: Wed, 15 Sep 2021 09:35:58 +0200 Subject: [PATCH] fix: missing content-type when changing avatar --- lib/src/client.dart | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/src/client.dart b/lib/src/client.dart index c33c08f0..6b7c6a49 100644 --- a/lib/src/client.dart +++ b/lib/src/client.dart @@ -727,7 +727,11 @@ class Client extends MatrixApi { /// Uploads a new user avatar for this user. Future setAvatar(MatrixFile file) async { - final uploadResp = await uploadContent(file.bytes, filename: file.name); + final uploadResp = await uploadContent( + file.bytes, + filename: file.name, + contentType: file.mimeType, + ); await setAvatarUrl(userID, uploadResp); return; }