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